Class StandardDeployer
java.lang.Object
org.eclipse.jetty.util.component.AbstractLifeCycle
org.eclipse.jetty.util.component.ContainerLifeCycle
org.eclipse.jetty.deploy.StandardDeployer
- All Implemented Interfaces:
Deployer
,Container
,Destroyable
,Dumpable
,Dumpable.DumpableContainer
,LifeCycle
A Direct
Deployer
implementation.
This Deployer
will deploy
a ContextHandler
directly to the ContextHandlerCollection
and start
it if
appropriate.-
Nested Class Summary
Nested classes/interfaces inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
AbstractLifeCycle.AbstractLifeCycleListener, AbstractLifeCycle.StopException
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Container
Container.InheritedListener, Container.Listener
Nested classes/interfaces inherited from interface org.eclipse.jetty.deploy.Deployer
Deployer.Listener
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Dumpable
Dumpable.DumpableContainer, Dumpable.DumpAppendable
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.LifeCycle
LifeCycle.Listener
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionStandardDeployer
(ContextHandlerCollection contexts) StandardDeployer
(ContextHandlerCollection contexts, boolean atomicRedeploy) -
Method Summary
Modifier and TypeMethodDescriptionboolean
addEventListener
(EventListener listener) Add an event listener.void
deploy
(ContextHandler contextHandler) Deploy a ContextHandler to the server, and start it if appropriate.void
redeploy
(ContextHandler oldHandler, ContextHandler newContextHandler) Redeploy a ContextHandler to the server, and start it if appropriate.boolean
removeEventListener
(EventListener listener) Remove an event listener.toString()
void
undeploy
(ContextHandler contextHandler) Undeploy and stop a ContextHandler.Methods inherited from class org.eclipse.jetty.util.component.ContainerLifeCycle
addBean, addBean, addManaged, contains, destroy, doStart, doStop, dump, dump, dump, dumpObjects, dumpStdErr, getBean, getBeans, getBeans, getContainedBeans, getContainedBeans, installBean, installBean, isAuto, isManaged, isUnmanaged, manage, removeBean, removeBeans, setBeans, start, stop, unmanage, updateBean, updateBean, updateBeans, updateBeans
Methods inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
getEventListeners, getState, getState, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, setEventListeners, start, stop
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.eclipse.jetty.util.component.Container
getCachedBeans, getEventListeners
Methods inherited from interface org.eclipse.jetty.util.component.Dumpable.DumpableContainer
isDumpable
-
Constructor Details
-
StandardDeployer
- Parameters:
contexts
- TheContextHandlerCollection
to which to deployContextHandler
s.
-
StandardDeployer
public StandardDeployer(@Name("contexts") ContextHandlerCollection contexts, @Name("atomicRedeploy") boolean atomicRedeploy) - Parameters:
contexts
- TheContextHandlerCollection
to which to deployContextHandler
s.atomicRedeploy
- Iftrue
, the new handler is deployed before undeploying the old handler This may result in instances of the same application running at the same time.
-
-
Method Details
-
getContexts
-
addEventListener
Description copied from interface:Container
Add an event listener. EventListeners added by this method are also added as beans.- Specified by:
addEventListener
in interfaceContainer
- Specified by:
addEventListener
in interfaceLifeCycle
- Overrides:
addEventListener
in classContainerLifeCycle
- Parameters:
listener
- the listener to add- Returns:
- true if the listener was added
- See Also:
-
removeEventListener
Description copied from interface:Container
Remove an event listener.- Specified by:
removeEventListener
in interfaceContainer
- Specified by:
removeEventListener
in interfaceLifeCycle
- Overrides:
removeEventListener
in classContainerLifeCycle
- Parameters:
listener
- the listener to remove- Returns:
- true if the listener was removed
- See Also:
-
deploy
Description copied from interface:Deployer
Deploy a ContextHandler to the server, and start it if appropriate.- Specified by:
deploy
in interfaceDeployer
- Parameters:
contextHandler
- theContextHandler
to deploy.
-
redeploy
Description copied from interface:Deployer
Redeploy a ContextHandler to the server, and start it if appropriate. If possible, this is done atomically without any period of no handler being deployed. However, it maybe implemented as anDeployer.undeploy(ContextHandler)
followed by aDeployer.deploy(ContextHandler)
- Specified by:
redeploy
in interfaceDeployer
- Parameters:
oldHandler
- theContextHandler
to undeploy.newContextHandler
- theContextHandler
to deploy.
-
undeploy
Description copied from interface:Deployer
Undeploy and stop a ContextHandler.- Specified by:
undeploy
in interfaceDeployer
- Parameters:
contextHandler
- theContextHandler
to undeploy.
-
toString
- Overrides:
toString
in classAbstractLifeCycle
-