org.eclipse.jetty.deploy
类 DeploymentManager

java.lang.Object
  继承者 org.eclipse.jetty.util.component.AbstractLifeCycle
      继承者 org.eclipse.jetty.util.component.AggregateLifeCycle
          继承者 org.eclipse.jetty.deploy.DeploymentManager
所有已实现的接口:
Destroyable, Dumpable, LifeCycle

public class DeploymentManager
extends AggregateLifeCycle

The Deployment Manager.

Responsibilities:

  1. Tracking Apps and their LifeCycle Location
  2. Managing AppProviders and the Apps that they provide.
  3. Executing AppLifeCycle on App based on current and desired LifeCycle Location.


嵌套类摘要
 class DeploymentManager.AppEntry
          Represents a single tracked app within the deployment manager.
 
从类 org.eclipse.jetty.util.component.AbstractLifeCycle 继承的嵌套类/接口
AbstractLifeCycle.AbstractLifeCycleListener
 
从接口 org.eclipse.jetty.util.component.LifeCycle 继承的嵌套类/接口
LifeCycle.Listener
 
字段摘要
 
从类 org.eclipse.jetty.util.component.AbstractLifeCycle 继承的字段
_listeners, FAILED, RUNNING, STARTED, STARTING, STOPPED, STOPPING
 
构造方法摘要
DeploymentManager()
           
 
方法摘要
 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)
          Get Set of Apps by 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()
           
 
从类 org.eclipse.jetty.util.component.AggregateLifeCycle 继承的方法
addBean, addBean, contains, destroy, dump, dump, dump, dump, dump, dumpObject, dumpStdErr, dumpThis, getBean, getBeans, getBeans, isManaged, manage, removeBean, removeBeans, unmanage
 
从类 org.eclipse.jetty.util.component.AbstractLifeCycle 继承的方法
addLifeCycleListener, getState, getState, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

DeploymentManager

public DeploymentManager()
方法详细信息

addApp

public void addApp(App app)
Receive an app for processing. Most commonly used by the various AppProvider implementations.


setAppProviders

public void setAppProviders(Collection<AppProvider> providers)
Set the AppProviders. The providers passed are added via AggregateLifeCycle.addBean(Object) so that their lifecycles may be managed as a AggregateLifeCycle.

参数:
providers -

getAppProviders

public Collection<AppProvider> getAppProviders()

addAppProvider

public void addAppProvider(AppProvider provider)

setLifeCycleBindings

public void setLifeCycleBindings(Collection<AppLifeCycle.Binding> bindings)

getLifeCycleBindings

public Collection<AppLifeCycle.Binding> getLifeCycleBindings()

addLifeCycleBinding

public void addLifeCycleBinding(AppLifeCycle.Binding binding)

insertLifeCycleNode

public void insertLifeCycleNode(String existingFromNodeName,
                                String existingToNodeName,
                                String insertedNodeName)
Convenience method to allow for insertion of nodes into the lifecycle.

参数:
existingFromNodeName -
existingToNodeName -
insertedNodeName -

doStart

protected void doStart()
                throws Exception
从类 AggregateLifeCycle 复制的描述
Start the managed lifecycle beans in the order they were added.

覆盖:
AggregateLifeCycle 中的 doStart
抛出:
Exception
另请参见:
AbstractLifeCycle.doStart()

doStop

protected void doStop()
               throws Exception
从类 AggregateLifeCycle 复制的描述
Stop the joined lifecycle beans in the reverse order they were added.

覆盖:
AggregateLifeCycle 中的 doStop
抛出:
Exception
另请参见:
AbstractLifeCycle.doStart()

getAppByOriginId

public App getAppByOriginId(String originId)

getAppEntries

public Collection<DeploymentManager.AppEntry> getAppEntries()

getApps

public Collection<App> getApps()

getApps

public Collection<App> getApps(Node node)
Get Set of Apps by Node

参数:
node - the node to look for.
返回:
the collection of apps for the node

getAppsWithSameContext

public List<App> getAppsWithSameContext(App app)

getContextAttribute

public Object getContextAttribute(String name)
Get a contextAttribute that will be set for every Context deployed by this provider.

参数:
name -
返回:
the context attribute value

getContextAttributes

public AttributesMap getContextAttributes()

getContexts

public ContextHandlerCollection getContexts()

getDefaultLifeCycleGoal

public String getDefaultLifeCycleGoal()

getLifeCycle

public AppLifeCycle getLifeCycle()

getServer

public Server getServer()

removeApp

public void removeApp(App app)
Remove the app from the tracking of the DeploymentManager

参数:
app - if the app is Unavailable remove it from the deployment manager.

removeAppProvider

public void removeAppProvider(AppProvider provider)

removeContextAttribute

public void removeContextAttribute(String name)
Remove a contextAttribute that will be set for every Context deployed by this provider.

参数:
name -

requestAppGoal

public 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.

参数:
app - the app to move through the process
nodeName - the name of the node to attain

requestAppGoal

public 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.

参数:
appId - the id of the app to move through the process
nodeName - the name of the node to attain

setContextAttribute

public void setContextAttribute(String name,
                                Object value)
Set a contextAttribute that will be set for every Context deployed by this provider.

参数:
name -
value -

setContextAttributes

public void setContextAttributes(AttributesMap contextAttributes)

setContexts

public void setContexts(ContextHandlerCollection contexts)

setDefaultLifeCycleGoal

public void setDefaultLifeCycleGoal(String defaultLifeCycleState)

undeployAll

public void undeployAll()

isUseStandardBindings

public boolean isUseStandardBindings()

setUseStandardBindings

public void setUseStandardBindings(boolean useStandardBindings)

getNodes

public Collection<Node> getNodes()

getApps

public Collection<App> getApps(String nodeName)


Copyright © 2013. All Rights Reserved.