public class DeploymentManager extends AggregateLifeCycle
Responsibilities:
Modifier and Type | Class and Description |
---|---|
class |
DeploymentManager.AppEntry
Represents a single tracked app within the deployment manager.
|
AbstractLifeCycle.AbstractLifeCycleListener
LifeCycle.Listener
_listeners, FAILED, RUNNING, STARTED, STARTING, STOPPED, STOPPING
Constructor and Description |
---|
DeploymentManager() |
Modifier and Type | Method and Description |
---|---|
void |
addApp(App app)
Receive an app for processing.
|
void |
addAppProvider(AppProvider provider) |
void |
addLifeCycleBinding(AppLifeCycle.Binding binding) |
protected void |
doStart()
Start the managed lifecycle beans in the order they were added.
|
protected void |
doStop()
Stop the joined lifecycle beans in the reverse order they were added.
|
App |
getAppByOriginId(String originId) |
Collection<DeploymentManager.AppEntry> |
getAppEntries() |
Collection<AppProvider> |
getAppProviders() |
Collection<App> |
getApps() |
Collection<App> |
getApps(Node node)
|
Collection<App> |
getApps(String nodeName) |
List<App> |
getAppsWithSameContext(App app) |
Object |
getContextAttribute(String name)
Get a contextAttribute that will be set for every Context deployed by this provider.
|
AttributesMap |
getContextAttributes() |
ContextHandlerCollection |
getContexts() |
String |
getDefaultLifeCycleGoal() |
AppLifeCycle |
getLifeCycle() |
Collection<AppLifeCycle.Binding> |
getLifeCycleBindings() |
Collection<Node> |
getNodes() |
Server |
getServer() |
void |
insertLifeCycleNode(String existingFromNodeName,
String existingToNodeName,
String insertedNodeName)
Convenience method to allow for insertion of nodes into the lifecycle.
|
boolean |
isUseStandardBindings() |
void |
removeApp(App app)
Remove the app from the tracking of the DeploymentManager
|
void |
removeAppProvider(AppProvider provider) |
void |
removeContextAttribute(String name)
Remove a contextAttribute that will be set for every Context deployed by this provider.
|
void |
requestAppGoal(App app,
String nodeName)
Move an
App through the AppLifeCycle to the desired Node , executing each lifecycle step
in the process to reach the desired state. |
void |
requestAppGoal(String appId,
String nodeName)
Move an
App through the AppLifeCycle to the desired Node , executing each lifecycle step
in the process to reach the desired state. |
void |
setAppProviders(Collection<AppProvider> providers)
Set the AppProviders.
|
void |
setContextAttribute(String name,
Object value)
Set a contextAttribute that will be set for every Context deployed by this provider.
|
void |
setContextAttributes(AttributesMap contextAttributes) |
void |
setContexts(ContextHandlerCollection contexts) |
void |
setDefaultLifeCycleGoal(String defaultLifeCycleState) |
void |
setLifeCycleBindings(Collection<AppLifeCycle.Binding> bindings) |
void |
setUseStandardBindings(boolean useStandardBindings) |
void |
undeployAll() |
addBean, addBean, contains, destroy, dump, dump, dump, dump, dump, dumpObject, dumpStdErr, dumpThis, getBean, getBeans, getBeans, isManaged, manage, removeBean, removeBeans, unmanage
addLifeCycleListener, getState, getState, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop
public void addApp(App app)
AppProvider
implementations.public void setAppProviders(Collection<AppProvider> providers)
AggregateLifeCycle.addBean(Object)
so that
their lifecycles may be managed as a AggregateLifeCycle
.providers
- public Collection<AppProvider> getAppProviders()
public void addAppProvider(AppProvider provider)
public void setLifeCycleBindings(Collection<AppLifeCycle.Binding> bindings)
public Collection<AppLifeCycle.Binding> getLifeCycleBindings()
public void addLifeCycleBinding(AppLifeCycle.Binding binding)
public void insertLifeCycleNode(String existingFromNodeName, String existingToNodeName, String insertedNodeName)
existingFromNodeName
- existingToNodeName
- insertedNodeName
- protected void doStart() throws Exception
AggregateLifeCycle
doStart
in class AggregateLifeCycle
Exception
AbstractLifeCycle.doStart()
protected void doStop() throws Exception
AggregateLifeCycle
doStop
in class AggregateLifeCycle
Exception
AbstractLifeCycle.doStart()
public Collection<DeploymentManager.AppEntry> getAppEntries()
public Collection<App> getApps()
public Collection<App> getApps(Node node)
node
- the node to look for.public Object getContextAttribute(String name)
name
- public AttributesMap getContextAttributes()
public ContextHandlerCollection getContexts()
public String getDefaultLifeCycleGoal()
public AppLifeCycle getLifeCycle()
public Server getServer()
public void removeApp(App app)
app
- if the app is Unavailable remove it from the deployment manager.public void removeAppProvider(AppProvider provider)
public void removeContextAttribute(String name)
name
- public void requestAppGoal(App app, String nodeName)
App
through the AppLifeCycle
to the desired Node
, executing each lifecycle step
in the process to reach the desired state.app
- the app to move through the processnodeName
- the name of the node to attainpublic void requestAppGoal(String appId, String nodeName)
App
through the AppLifeCycle
to the desired Node
, executing each lifecycle step
in the process to reach the desired state.appId
- the id of the app to move through the processnodeName
- the name of the node to attainpublic void setContextAttribute(String name, Object value)
name
- value
- public void setContextAttributes(AttributesMap contextAttributes)
public void setContexts(ContextHandlerCollection contexts)
public void setDefaultLifeCycleGoal(String defaultLifeCycleState)
public void undeployAll()
public boolean isUseStandardBindings()
public void setUseStandardBindings(boolean useStandardBindings)
public Collection<Node> getNodes()
public Collection<App> getApps(String nodeName)
Copyright © 1995-2013 Mort Bay Consulting. All Rights Reserved.