org.eclipse.jetty.deploy
Class DeploymentManager

java.lang.Object
  extended by org.eclipse.jetty.util.component.AbstractLifeCycle
      extended by org.eclipse.jetty.deploy.DeploymentManager
All Implemented Interfaces:
LifeCycle

public class DeploymentManager
extends AbstractLifeCycle

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.


Nested Class Summary
 class DeploymentManager.AppEntry
          Represents a single tracked app within the deployment manager.
 
Nested classes/interfaces inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
AbstractLifeCycle.AbstractLifeCycleListener
 
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.LifeCycle
LifeCycle.Listener
 
Field Summary
 
Fields inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
_listeners, FAILED, RUNNING, STARTED, STARTING, STOPPED, STOPPING
 
Constructor Summary
DeploymentManager()
           
 
Method Summary
 void addApp(App app)
          Receive an app for processing.
 void addAppProvider(AppProvider provider)
           
 void addLifeCycleBinding(AppLifeCycle.Binding binding)
           
protected  void doStart()
           
protected  void doStop()
           
 App getAppByContextId(String contextId)
           
 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
 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()
           
 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)
           
 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()
           
 
Methods inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
addLifeCycleListener, getState, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DeploymentManager

public DeploymentManager()
Method Detail

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)

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.

Parameters:
existingFromNodeName -
existingToNodeName -
insertedNodeName -

doStart

protected void doStart()
                throws Exception
Overrides:
doStart in class AbstractLifeCycle
Throws:
Exception

doStop

protected void doStop()
               throws Exception
Overrides:
doStop in class AbstractLifeCycle
Throws:
Exception

getAppByContextId

public App getAppByContextId(String contextId)

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

Parameters:
node - the node to look for.
Returns:
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.

Parameters:
name -
Returns:
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

Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
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)


Copyright © 1995-2010 Mort Bay Consulting. All Rights Reserved.