@Beta public interface ApplicationEventListener
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
APPLICATION_EVENT_LISTENER
A key used for registering a application event listener implementation.
|
static ApplicationEventListener |
NO_OP
An instance of @ApplicationEventListener that does not do anything.
|
| Modifier and Type | Method and Description |
|---|---|
void |
onApplicationDestroyed()
Called when the application has been destroyed.
|
void |
onApplicationInitialized(java.lang.String applicationName)
Called when the application has been initialized.
|
EndpointEventListener |
onEndpointRegistered(java.lang.String endpointPath,
java.lang.Class<?> endpointClass)
Called when an endpoint has been registered.
|
void |
onEndpointUnregistered(java.lang.String endpointPath)
Called when an endpoint has been unregistered.
|
static final java.lang.String APPLICATION_EVENT_LISTENER
For monitoring in Grizzly server an instance should be passed to the server in server properties:
serverProperties.put(ApplicationEventListener.APPLICATION_EVENT_LISTENER, new MyApplicationEventListener());
For use in servlet container the class name should be passed as a context parameter in web.xml:
<context-param>
<param-name>org.glassfish.tyrus.core.monitoring.ApplicationEventListener</param-name>
<param-value>com.acme.MyApplicationEventListener</param-value>
</context-param>static final ApplicationEventListener NO_OP
void onApplicationInitialized(java.lang.String applicationName)
applicationName - name of the initialized application.void onApplicationDestroyed()
EndpointEventListener onEndpointRegistered(java.lang.String endpointPath, java.lang.Class<?> endpointClass)
endpointPath - the path the endpoint has been registered on.endpointClass - class of the registered endpoint.void onEndpointUnregistered(java.lang.String endpointPath)
endpointPath - the path the endpoint has been registered on.Copyright © 2012–2020 Oracle Corporation. All rights reserved.