Class MonitoringContainerListener
java.lang.Object
org.glassfish.jersey.server.internal.monitoring.MonitoringContainerListener
- All Implemented Interfaces:
ContainerLifecycleListener
Container listener that listens to container events and trigger the
application events
and call them on supplied RequestEventListener.
This listener must be registered as a standard provider in Jersey runtime.- Author:
- Miroslav Fuksa
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA binder that binds theMonitoringContainerListener. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidinit(ApplicationEventListener listener, ApplicationEvent initFinishedEvent) Initializes the instance with listener that must be called and initialization event.voidInvoked when thecontainerhas been reloaded.voidonShutdown(Container container) Invoke at thecontainershut-down.voidInvoked at thecontainerstart-up.
-
Constructor Details
-
MonitoringContainerListener
public MonitoringContainerListener()
-
-
Method Details
-
init
Initializes the instance with listener that must be called and initialization event. If this method is not called then events cannot not be triggered which might be needed when noApplicationEventListeneris registered in Jersey runtime.- Parameters:
listener- Listener that should be called.initFinishedEvent- Event of typeApplicationEvent.Type.INITIALIZATION_START.
-
onStartup
Description copied from interface:ContainerLifecycleListenerInvoked at thecontainerstart-up. This method is invoked even when application is reloaded and new instance of application has started.- Specified by:
onStartupin interfaceContainerLifecycleListener- Parameters:
container- container that has been started.
-
onReload
Description copied from interface:ContainerLifecycleListenerInvoked when thecontainerhas been reloaded.- Specified by:
onReloadin interfaceContainerLifecycleListener- Parameters:
container- container that has been reloaded.
-
onShutdown
Description copied from interface:ContainerLifecycleListenerInvoke at thecontainershut-down. This method is invoked even before the application is being stopped as a part of reload.- Specified by:
onShutdownin interfaceContainerLifecycleListener- Parameters:
container- container that has been shut down.
-