@ManagedObject(value="Deployment Manager") public class DeploymentManager extends ContainerLifeCycle
Responsibilities:
Modifier and Type | Class and Description |
---|---|
class |
DeploymentManager.AppEntry
Represents a single tracked app within the deployment manager.
|
AbstractLifeCycle.AbstractLifeCycleListener
Container.InheritedListener, Container.Listener
LifeCycle.Listener
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()
Starts the managed lifecycle beans in the order they were added.
|
protected void |
doStop()
Stops the managed 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, addBean, addEventListener, addManaged, contains, destroy, dump, dump, dump, dump, dump, dumpBeans, dumpObject, dumpStdErr, dumpThis, getBean, getBeans, getBeans, isManaged, manage, removeBean, removeBeans, removeEventListener, setBeans, setStopTimeout, start, stop, unmanage, updateBean, updateBeans
addLifeCycleListener, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop
public void addApp(App app)
AppProvider
implementations.public void setAppProviders(Collection<AppProvider> providers)
ContainerLifeCycle.addBean(Object)
so that
their lifecycles may be managed as a ContainerLifeCycle
.providers
- @ManagedAttribute(value="Application 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
ContainerLifeCycle
doStart
in class ContainerLifeCycle
Exception
protected void doStop() throws Exception
ContainerLifeCycle
doStop
in class ContainerLifeCycle
Exception
public Collection<DeploymentManager.AppEntry> getAppEntries()
@ManagedAttribute(value="Deployed Apps") 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()
@ManagedAttribute(value="Deployed Contexts") 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 attain@ManagedOperation(value="request the app to be moved to the specified lifecycle node", impact="ACTION") public void requestAppGoal(@Name(value="appId") String appId, @Name(value="nodeName") 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()
@ManagedOperation(value="list apps that are located at specified App LifeCycle nodes", impact="ACTION") public Collection<App> getApps(@Name(value="nodeName") String nodeName)
Copyright © 1995-2015 Webtide. All Rights Reserved.