Class ApplicationInfoListener
- java.lang.Object
-
- org.glassfish.jersey.server.internal.monitoring.ApplicationInfoListener
-
- All Implemented Interfaces:
ApplicationEventListener
@Priority(1000) public final class ApplicationInfoListener extends java.lang.Object implements ApplicationEventListener
Application event listener
that listens toapplication
events and just prepareApplicationInfo
instance to be injectable.- See Also:
MonitoringEventListener
-
-
Field Summary
Fields Modifier and Type Field Description private javax.inject.Provider<Ref<ApplicationInfo>>
applicationInfoRefProvider
static int
PRIORITY
-
Constructor Summary
Constructors Constructor Description ApplicationInfoListener()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
onEvent(ApplicationEvent event)
Process the applicationevent
.RequestEventListener
onRequest(RequestEvent requestEvent)
Process a new request and return arequest event listener
if listening torequest events
is required.private void
processApplicationStatistics(ApplicationEvent event)
-
-
-
Field Detail
-
PRIORITY
public static final int PRIORITY
- See Also:
- Constant Field Values
-
applicationInfoRefProvider
@Inject private javax.inject.Provider<Ref<ApplicationInfo>> applicationInfoRefProvider
-
-
Method Detail
-
onRequest
public RequestEventListener onRequest(RequestEvent requestEvent)
Description copied from interface:ApplicationEventListener
Process a new request and return arequest event listener
if listening torequest events
is required. The method is called once for each new incoming request. If listening to the request is required then request event must be returned from the method. Such a request event listener will receive all request events that one request. If listening to request event for the request is not required thennull
must be returned from the method (do not return empty mock listener in these cases as it will have negative performance impact).- Specified by:
onRequest
in interfaceApplicationEventListener
- Parameters:
requestEvent
- Event of typeRequestEvent.Type.START
.- Returns:
- Request event listener that will monitor the events of the request
connected with
requestEvent
; null otherwise.
-
onEvent
public void onEvent(ApplicationEvent event)
Description copied from interface:ApplicationEventListener
Process the applicationevent
. This method is called when new event occurs.- Specified by:
onEvent
in interfaceApplicationEventListener
- Parameters:
event
- Application event.
-
processApplicationStatistics
private void processApplicationStatistics(ApplicationEvent event)
-
-