Class TomcatEventHandlerAdapter
java.lang.Object
org.jboss.modcluster.container.tomcat.TomcatEventHandlerAdapter
- All Implemented Interfaces:
PropertyChangeListener,EventListener,org.apache.catalina.ContainerListener,org.apache.catalina.LifecycleListener,TomcatEventHandler
Adapts lifecycle and container listener events to the
ContainerEventHandler interface.- Author:
- Paul Ferraro, Radoslav Husar
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final ContainerEventHandlerprotected final AtomicBooleanprotected final TomcatRegistryprotected final ServerProviderprotected final AtomicBoolean -
Constructor Summary
ConstructorsConstructorDescriptionTomcatEventHandlerAdapter(ContainerEventHandler eventHandler, TomcatConnectorConfiguration connectorConfiguration) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddListeners(org.apache.catalina.Server server) voidcontainerEvent(org.apache.catalina.ContainerEvent event) Acknowledge the occurrence of the specified event.protected voiddestroy(org.apache.catalina.Server server) protected voidinit(org.apache.catalina.Server server) protected booleanisAfterInit(org.apache.catalina.LifecycleEvent event) protected booleanisBeforeDestroy(org.apache.catalina.LifecycleEvent event) voidlifecycleEvent(org.apache.catalina.LifecycleEvent event) Primary entry point for startup and shutdown events.voidprotected voidremoveListeners(org.apache.catalina.Server server) voidstart()voidstop()protected static ObjectNametoObjectName(String name)
-
Field Details
-
eventHandler
-
serverProvider
-
registry
-
init
-
start
-
-
Constructor Details
-
TomcatEventHandlerAdapter
public TomcatEventHandlerAdapter(ContainerEventHandler eventHandler, TomcatConnectorConfiguration connectorConfiguration)
-
-
Method Details
-
start
public void start()- Specified by:
startin interfaceTomcatEventHandler
-
stop
public void stop()- Specified by:
stopin interfaceTomcatEventHandler
-
containerEvent
public void containerEvent(org.apache.catalina.ContainerEvent event) Acknowledge the occurrence of the specified event. Note: Will never be called when the listener is associated to a Server, since it is not a Container.- Specified by:
containerEventin interfaceorg.apache.catalina.ContainerListener
-
lifecycleEvent
public void lifecycleEvent(org.apache.catalina.LifecycleEvent event) Primary entry point for startup and shutdown events. Handles both situations where Listener is defined on either a top-level Server concept or Service in which case only the associated service is handled.- Specified by:
lifecycleEventin interfaceorg.apache.catalina.LifecycleListener
-
isAfterInit
protected boolean isAfterInit(org.apache.catalina.LifecycleEvent event) -
isBeforeDestroy
protected boolean isBeforeDestroy(org.apache.catalina.LifecycleEvent event) -
init
protected void init(org.apache.catalina.Server server) -
destroy
protected void destroy(org.apache.catalina.Server server) -
addListeners
protected void addListeners(org.apache.catalina.Server server) -
removeListeners
protected void removeListeners(org.apache.catalina.Server server) -
toObjectName
-
propertyChange
- Specified by:
propertyChangein interfacePropertyChangeListener
-