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 class
A binder that binds theMonitoringContainerListener
. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
init
(ApplicationEventListener listener, ApplicationEvent initFinishedEvent) Initializes the instance with listener that must be called and initialization event.void
Invoked when thecontainer
has been reloaded.void
onShutdown
(Container container) Invoke at thecontainer
shut-down.void
Invoked at thecontainer
start-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 noApplicationEventListener
is registered in Jersey runtime.- Parameters:
listener
- Listener that should be called.initFinishedEvent
- Event of typeApplicationEvent.Type.INITIALIZATION_START
.
-
onStartup
Description copied from interface:ContainerLifecycleListener
Invoked at thecontainer
start-up. This method is invoked even when application is reloaded and new instance of application has started.- Specified by:
onStartup
in interfaceContainerLifecycleListener
- Parameters:
container
- container that has been started.
-
onReload
Description copied from interface:ContainerLifecycleListener
Invoked when thecontainer
has been reloaded.- Specified by:
onReload
in interfaceContainerLifecycleListener
- Parameters:
container
- container that has been reloaded.
-
onShutdown
Description copied from interface:ContainerLifecycleListener
Invoke at thecontainer
shut-down. This method is invoked even before the application is being stopped as a part of reload.- Specified by:
onShutdown
in interfaceContainerLifecycleListener
- Parameters:
container
- container that has been shut down.
-