Class DeploymentManager
java.lang.Object
org.eclipse.jetty.util.component.AbstractLifeCycle
org.eclipse.jetty.util.component.ContainerLifeCycle
org.eclipse.jetty.deploy.DeploymentManager
- All Implemented Interfaces:
Container, Destroyable, Dumpable, Dumpable.DumpableContainer, LifeCycle
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 AbstractLifeCycle
AbstractLifeCycle.AbstractLifeCycleListener, AbstractLifeCycle.StopExceptionNested classes/interfaces inherited from interface Container
Container.InheritedListener, Container.ListenerNested classes/interfaces inherited from interface Dumpable
Dumpable.DumpableContainerNested classes/interfaces inherited from interface LifeCycle
LifeCycle.Listener -
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidReceive an app for processing.voidaddAppProvider(AppProvider provider) voidaddLifeCycleBinding(AppLifeCycle.Binding binding) protected voiddoStart()Starts the managed lifecycle beans in the order they were added.protected voiddoStop()Stops the managed lifecycle beans in the reverse order they were added.getApps()Get the defaultEnvironmentname for deployed applications, which is the maximal name when using theDeployable.ENVIRONMENT_COMPARATOR.getNodes()booleanhasAppProviderFor(String environmentName) voidinsertLifeCycleNode(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) 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.voidsetAppProviders(Collection<AppProvider> providers) Set the AppProviders.voidsetContexts(ContextHandlerCollection contexts) voidsetDefaultLifeCycleGoal(String defaultLifeCycleState) voidsetLifeCycleBindings(Collection<AppLifeCycle.Binding> bindings) voidsetUseStandardBindings(boolean useStandardBindings) voidMethods inherited from class ContainerLifeCycle
addBean, addBean, addEventListener, addManaged, contains, destroy, dump, dump, dump, dumpObjects, dumpStdErr, getBean, getBeans, getBeans, getContainedBeans, getContainedBeans, installBean, installBean, isAuto, isManaged, isUnmanaged, manage, removeBean, removeBeans, removeEventListener, setBeans, start, stop, unmanage, updateBean, updateBean, updateBeans, updateBeansMethods inherited from class AbstractLifeCycle
getEventListeners, getState, getState, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, setEventListeners, start, stop, toStringMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface Container
getCachedBeans, getEventListenersMethods inherited from interface Dumpable.DumpableContainer
isDumpable
-
Constructor Details
-
DeploymentManager
public DeploymentManager()
-
-
Method Details
-
getDefaultEnvironmentName
Get the defaultEnvironmentname for deployed applications, which is the maximal name when using theDeployable.ENVIRONMENT_COMPARATOR.- Returns:
- The default
Environmentname or null.
-
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
-
hasAppProviderFor
-
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
Description copied from class:ContainerLifeCycleStarts the managed lifecycle beans in the order they were added.- Overrides:
doStartin classContainerLifeCycle- Throws:
Exception- If there was a problem starting. Will cause a transition to FAILED state
-
doStop
Description copied from class:ContainerLifeCycleStops the managed lifecycle beans in the reverse order they were added.- Overrides:
doStopin classContainerLifeCycle- Throws:
Exception- If there was a problem stopping. Will cause a transition to FAILED state
-
getApp
-
getApp
-
getAppEntries
-
getApps
-
getApps
- Parameters:
node- the node to look for.- Returns:
- the collection of apps for the node
-
getApps
-
getAppsWithSameContext
-
getContexts
-
getDefaultLifeCycleGoal
-
getLifeCycle
-
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
-
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
-
setContexts
-
setDefaultLifeCycleGoal
-
undeployAll
public void undeployAll() -
isUseStandardBindings
public boolean isUseStandardBindings() -
setUseStandardBindings
public void setUseStandardBindings(boolean useStandardBindings) -
getNodes
-