@Provider public class InstrumentedResourceMethodApplicationListener extends Object implements org.glassfish.jersey.server.monitoring.ApplicationEventListener
RequestEventListener
that updates the relevant metric for suitably annotated methods when it gets the
request events indicating that the method is about to be invoked, or just got done
being invoked.Constructor and Description |
---|
InstrumentedResourceMethodApplicationListener(MetricRegistry metrics)
Construct an application event listener using the given metrics registry.
|
Modifier and Type | Method and Description |
---|---|
protected static String |
chooseName(String explicitName,
boolean absolute,
org.glassfish.jersey.server.model.ResourceMethod method,
String... suffixes) |
void |
onEvent(org.glassfish.jersey.server.monitoring.ApplicationEvent event) |
org.glassfish.jersey.server.monitoring.RequestEventListener |
onRequest(org.glassfish.jersey.server.monitoring.RequestEvent event) |
public InstrumentedResourceMethodApplicationListener(MetricRegistry metrics)
InstrumentedResourceMethodApplicationListener
should be added to a Jersey ResourceConfig
as a singleton.metrics
- a MetricRegistry
public void onEvent(org.glassfish.jersey.server.monitoring.ApplicationEvent event)
onEvent
in interface org.glassfish.jersey.server.monitoring.ApplicationEventListener
public org.glassfish.jersey.server.monitoring.RequestEventListener onRequest(org.glassfish.jersey.server.monitoring.RequestEvent event)
onRequest
in interface org.glassfish.jersey.server.monitoring.ApplicationEventListener
Copyright © 2014. All Rights Reserved.