@Beta public interface ApplicationEventListener
Modifier and Type | Field and Description |
---|---|
static 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(String applicationName)
Called when the application has been initialized.
|
EndpointEventListener |
onEndpointRegistered(String endpointPath,
Class<?> endpointClass)
Called when an endpoint has been registered.
|
void |
onEndpointUnregistered(String endpointPath)
Called when an endpoint has been unregistered.
|
static final String APPLICATION_EVENT_LISTENER
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(String applicationName)
applicationName
- name of the initialized application.void onApplicationDestroyed()
EndpointEventListener onEndpointRegistered(String endpointPath, Class<?> endpointClass)
endpointPath
- the path the endpoint has been registered on.endpointClass
- class of the registered endpoint.void onEndpointUnregistered(String endpointPath)
endpointPath
- the path the endpoint has been registered on.Copyright © 2012-2015, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.