java.lang.Object
org.eclipse.jetty.util.component.AbstractLifeCycle
org.eclipse.jetty.util.component.ContainerLifeCycle
org.eclipse.jetty.deploy.DeploymentManager
- All Implemented Interfaces:
org.eclipse.jetty.util.component.Container,org.eclipse.jetty.util.component.Destroyable,org.eclipse.jetty.util.component.Dumpable,org.eclipse.jetty.util.component.Dumpable.DumpableContainer,org.eclipse.jetty.util.component.LifeCycle
@ManagedObject("Deployment Manager")
public class DeploymentManager
extends org.eclipse.jetty.util.component.ContainerLifeCycle
The Deployment Manager.
Responsibilities:
- Tracking Apps and their LifeCycle Location
- Managing AppProviders and the Apps that they provide.
- Executing AppLifeCycle on App based on current and desired LifeCycle Location.

-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassRepresents a single tracked app within the deployment manager.Nested classes/interfaces inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
org.eclipse.jetty.util.component.AbstractLifeCycle.AbstractLifeCycleListener, org.eclipse.jetty.util.component.AbstractLifeCycle.StopExceptionNested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Container
org.eclipse.jetty.util.component.Container.InheritedListener, org.eclipse.jetty.util.component.Container.ListenerNested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Dumpable
org.eclipse.jetty.util.component.Dumpable.DumpableContainerNested classes/interfaces inherited from interface org.eclipse.jetty.util.component.LifeCycle
org.eclipse.jetty.util.component.LifeCycle.Listener -
Field Summary
Fields inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
FAILED, STARTED, STARTING, STOPPED, STOPPINGFields inherited from interface org.eclipse.jetty.util.component.Dumpable
KEY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidReceive an app for processing.voidaddAppProvider(AppProvider provider) voidaddLifeCycleBinding(AppLifeCycle.Binding binding) protected voiddoStart()protected voiddoStop()getAppByOriginId(String originId) getApps()getContextAttribute(String name) Get a contextAttribute that will be set for every Context deployed by this provider.org.eclipse.jetty.util.AttributesMaporg.eclipse.jetty.server.handler.ContextHandlerCollectiongetNodes()org.eclipse.jetty.server.ServervoidinsertLifeCycleNode(String existingFromNodeName, String existingToNodeName, String insertedNodeName) Convenience method to allow for insertion of nodes into the lifecycle.booleanvoidRemove the app from the tracking of the DeploymentManagervoidremoveAppProvider(AppProvider provider) voidremoveContextAttribute(String name) Remove a contextAttribute that will be set for every Context deployed by this provider.voidrequestAppGoal(String appId, String nodeName) Move anAppthrough theAppLifeCycleto the desiredNode, executing each lifecycle step in the process to reach the desired state.voidrequestAppGoal(App app, String nodeName) Move anAppthrough theAppLifeCycleto the desiredNode, executing each lifecycle step in the process to reach the desired state.voidscope(org.eclipse.jetty.xml.XmlConfiguration xmlc, org.eclipse.jetty.util.resource.Resource webapp) voidsetAppProviders(Collection<AppProvider> providers) Set the AppProviders.voidsetContextAttribute(String name, Object value) Set a contextAttribute that will be set for every Context deployed by this provider.voidsetContextAttributes(org.eclipse.jetty.util.AttributesMap contextAttributes) voidsetContexts(org.eclipse.jetty.server.handler.ContextHandlerCollection contexts) voidsetDefaultLifeCycleGoal(String defaultLifeCycleState) voidsetLifeCycleBindings(Collection<AppLifeCycle.Binding> bindings) voidsetUseStandardBindings(boolean useStandardBindings) voidMethods inherited from class org.eclipse.jetty.util.component.ContainerLifeCycle
addBean, addBean, addEventListener, addManaged, contains, destroy, dump, dump, dump, dumpObjects, dumpStdErr, getBean, getBeans, getBeans, getContainedBeans, getContainedBeans, isAuto, isManaged, isUnmanaged, manage, removeBean, removeBeans, removeEventListener, setBeans, start, stop, unmanage, updateBean, updateBean, updateBeans, updateBeansMethods inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
getEventListeners, getState, getState, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, setEventListeners, start, stop, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.eclipse.jetty.util.component.Container
getCachedBeans, getEventListenersMethods inherited from interface org.eclipse.jetty.util.component.Dumpable
dumpSelfMethods inherited from interface org.eclipse.jetty.util.component.Dumpable.DumpableContainer
isDumpable
-
Constructor Details
-
DeploymentManager
public DeploymentManager()
-
-
Method Details
-
addApp
Receive an app for processing. Most commonly used by the variousAppProviderimplementations.- Parameters:
app- the app
-
setAppProviders
Set the AppProviders. The providers passed are added viaContainerLifeCycle.addBean(Object)so that their lifecycles may be managed as aContainerLifeCycle.- Parameters:
providers- the app provider list
-
getAppProviders
-
addAppProvider
-
setLifeCycleBindings
-
getLifeCycleBindings
-
addLifeCycleBinding
-
insertLifeCycleNode
public void insertLifeCycleNode(String existingFromNodeName, String existingToNodeName, String insertedNodeName) Convenience method to allow for insertion of nodes into the lifecycle.- Parameters:
existingFromNodeName- the existing node startexistingToNodeName- the existing node endinsertedNodeName- the new node to create between the existing nodes
-
doStart
- Overrides:
doStartin classorg.eclipse.jetty.util.component.ContainerLifeCycle- Throws:
Exception
-
doStop
- Overrides:
doStopin classorg.eclipse.jetty.util.component.ContainerLifeCycle- Throws:
Exception
-
getAppByOriginId
-
getAppEntries
-
getApps
-
getApps
- Parameters:
node- the node to look for.- Returns:
- the collection of apps for the node
-
getApps
-
getAppsWithSameContext
-
getContextAttribute
Get a contextAttribute that will be set for every Context deployed by this provider.- Parameters:
name- context attribute name- Returns:
- the context attribute value
-
getContextAttributes
public org.eclipse.jetty.util.AttributesMap getContextAttributes() -
getContexts
@ManagedAttribute("Deployed Contexts") public org.eclipse.jetty.server.handler.ContextHandlerCollection getContexts() -
getDefaultLifeCycleGoal
-
getLifeCycle
-
getServer
public org.eclipse.jetty.server.Server getServer() -
removeApp
Remove the app from the tracking of the DeploymentManager- Parameters:
app- if the app is Unavailable remove it from the deployment manager.
-
removeAppProvider
-
removeContextAttribute
Remove a contextAttribute that will be set for every Context deployed by this provider.- Parameters:
name- the context attribute name
-
requestAppGoal
Move anAppthrough theAppLifeCycleto the desiredNode, executing each lifecycle step in the process to reach the desired state.- Parameters:
app- the app to move through the processnodeName- the name of the node to attain
-
requestAppGoal
@ManagedOperation(value="request the app to be moved to the specified lifecycle node", impact="ACTION") public void requestAppGoal(@Name("appId") String appId, @Name("nodeName") String nodeName) Move anAppthrough theAppLifeCycleto the desiredNode, executing each lifecycle step in the process to reach the desired state.- Parameters:
appId- the id of the app to move through the processnodeName- the name of the node to attain
-
setContextAttribute
Set a contextAttribute that will be set for every Context deployed by this provider.- Parameters:
name- the context attribute namevalue- the context attribute value
-
setContextAttributes
public void setContextAttributes(org.eclipse.jetty.util.AttributesMap contextAttributes) -
setContexts
public void setContexts(org.eclipse.jetty.server.handler.ContextHandlerCollection contexts) -
setDefaultLifeCycleGoal
-
undeployAll
public void undeployAll() -
isUseStandardBindings
public boolean isUseStandardBindings() -
setUseStandardBindings
public void setUseStandardBindings(boolean useStandardBindings) -
getNodes
-
scope
public void scope(org.eclipse.jetty.xml.XmlConfiguration xmlc, org.eclipse.jetty.util.resource.Resource webapp) throws IOException - Throws:
IOException
-