Class MonitoringContainerListener
- java.lang.Object
-
- org.glassfish.jersey.server.internal.monitoring.MonitoringContainerListener
-
- All Implemented Interfaces:
ContainerLifecycleListener
public final class MonitoringContainerListener extends Object implements ContainerLifecycleListener
Container listener that listens to container events and trigger theapplication eventsand call them on suppliedRequestEventListener. This listener must be registered as a standard provider in Jersey runtime.- Author:
- Miroslav Fuksa
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMonitoringContainerListener.BinderA binder that binds theMonitoringContainerListener.
-
Constructor Summary
Constructors Constructor Description MonitoringContainerListener()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidinit(ApplicationEventListener listener, ApplicationEvent initFinishedEvent)Initializes the instance with listener that must be called and initialization event.voidonReload(Container container)Invoked when thecontainerhas been reloaded.voidonShutdown(Container container)Invoke at thecontainershut-down.voidonStartup(Container container)Invoked at thecontainerstart-up.
-
-
-
Method Detail
-
init
public void init(ApplicationEventListener listener, ApplicationEvent initFinishedEvent)
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
public void onStartup(Container container)
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
public void onReload(Container container)
Description copied from interface:ContainerLifecycleListenerInvoked when thecontainerhas been reloaded.- Specified by:
onReloadin interfaceContainerLifecycleListener- Parameters:
container- container that has been reloaded.
-
onShutdown
public void onShutdown(Container container)
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.
-
-