Class InstrumentedEE10Handler
java.lang.Object
org.eclipse.jetty.util.component.AbstractLifeCycle
org.eclipse.jetty.util.component.ContainerLifeCycle
org.eclipse.jetty.server.Handler.Abstract
org.eclipse.jetty.server.Handler.AbstractContainer
org.eclipse.jetty.server.Handler.Wrapper
io.dropwizard.metrics.jetty12.AbstractInstrumentedHandler
io.dropwizard.metrics.jetty12.ee10.InstrumentedEE10Handler
- All Implemented Interfaces:
org.eclipse.jetty.server.Handler,org.eclipse.jetty.server.Handler.Container,org.eclipse.jetty.server.Handler.Singleton,org.eclipse.jetty.server.Request.Handler,org.eclipse.jetty.util.component.Container,org.eclipse.jetty.util.component.Destroyable,org.eclipse.jetty.util.component.Dumpable,org.eclipse.jetty.util.component.Dumpable.DumpableContainer,org.eclipse.jetty.util.component.LifeCycle,org.eclipse.jetty.util.thread.Invocable
public class InstrumentedEE10Handler
extends io.dropwizard.metrics.jetty12.AbstractInstrumentedHandler
A Jetty
Handler which records various metrics about an underlying Handler
instance. This Handler requires a ServletContextHandler to be present.
For correct behaviour, the ServletContextHandler should be before this handler
in the handler chain. To achieve this, one can use
ServletContextHandler.insertHandler(Singleton).-
Nested Class Summary
Nested classes/interfaces inherited from class org.eclipse.jetty.server.Handler.Abstract
org.eclipse.jetty.server.Handler.Abstract.NonBlockingNested classes/interfaces inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
org.eclipse.jetty.util.component.AbstractLifeCycle.AbstractLifeCycleListener, org.eclipse.jetty.util.component.AbstractLifeCycle.StopExceptionNested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Container
org.eclipse.jetty.util.component.Container.InheritedListener, org.eclipse.jetty.util.component.Container.ListenerNested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Dumpable
org.eclipse.jetty.util.component.Dumpable.DumpableContainerNested classes/interfaces inherited from interface org.eclipse.jetty.server.Handler
org.eclipse.jetty.server.Handler.Abstract, org.eclipse.jetty.server.Handler.AbstractContainer, org.eclipse.jetty.server.Handler.Collection, org.eclipse.jetty.server.Handler.Container, org.eclipse.jetty.server.Handler.Sequence, org.eclipse.jetty.server.Handler.Singleton, org.eclipse.jetty.server.Handler.WrapperNested classes/interfaces inherited from interface org.eclipse.jetty.util.thread.Invocable
org.eclipse.jetty.util.thread.Invocable.Callable, org.eclipse.jetty.util.thread.Invocable.InvocationType, org.eclipse.jetty.util.thread.Invocable.ReadyTask, org.eclipse.jetty.util.thread.Invocable.TaskNested classes/interfaces inherited from interface org.eclipse.jetty.util.component.LifeCycle
org.eclipse.jetty.util.component.LifeCycle.ListenerNested classes/interfaces inherited from interface org.eclipse.jetty.server.Request.Handler
org.eclipse.jetty.server.Request.Handler.AbortException -
Field Summary
Fields inherited from class io.dropwizard.metrics.jetty12.AbstractInstrumentedHandler
activeDispatches, activeRequests, activeSuspended, asyncDispatches, asyncTimeouts, COARSE_METER_LEVELS, connectRequests, deleteRequests, DETAILED_METER_LEVELS, dispatches, getRequests, headRequests, metricRegistry, moveRequests, NAME_1XX_RESPONSES, NAME_2XX_RESPONSES, NAME_3XX_RESPONSES, NAME_4XX_RESPONSES, NAME_5XX_RESPONSES, NAME_ACTIVE_DISPATCHES, NAME_ACTIVE_REQUESTS, NAME_ACTIVE_SUSPENDED, NAME_ASYNC_DISPATCHES, NAME_ASYNC_TIMEOUTS, NAME_CONNECT_REQUESTS, NAME_DELETE_REQUESTS, NAME_DISPATCHES, NAME_GET_REQUESTS, NAME_HEAD_REQUESTS, NAME_MOVE_REQUESTS, NAME_OPTIONS_REQUESTS, NAME_OTHER_REQUESTS, NAME_PERCENT_4XX_15M, NAME_PERCENT_4XX_1M, NAME_PERCENT_4XX_5M, NAME_PERCENT_5XX_15M, NAME_PERCENT_5XX_1M, NAME_PERCENT_5XX_5M, NAME_POST_REQUESTS, NAME_PUT_REQUESTS, NAME_REQUESTS, NAME_TRACE_REQUESTS, optionsRequests, otherRequests, postRequests, prefix, putRequests, requests, responseCodeMeters, responseMeteredLevel, responses, traceRequestsFields inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
FAILED, STARTED, STARTING, STOPPED, STOPPINGFields inherited from interface org.eclipse.jetty.util.component.Dumpable
KEYFields inherited from interface org.eclipse.jetty.util.thread.Invocable
__nonBlocking, NOOP -
Constructor Summary
ConstructorsConstructorDescriptionInstrumentedEE10Handler(com.codahale.metrics.MetricRegistry registry) Create a new instrumented handler using a given metrics registry.InstrumentedEE10Handler(com.codahale.metrics.MetricRegistry registry, String prefix) Create a new instrumented handler using a given metrics registry.InstrumentedEE10Handler(com.codahale.metrics.MetricRegistry registry, String prefix, com.codahale.metrics.annotation.ResponseMeteredLevel responseMeteredLevel) Create a new instrumented handler using a given metrics registry. -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddoStart()protected voiddoStop()protected booleanisSuspended(org.eclipse.jetty.server.Request request, org.eclipse.jetty.server.Response response) protected voidsetupServletListeners(org.eclipse.jetty.server.Request request, org.eclipse.jetty.server.Response response) Methods inherited from class io.dropwizard.metrics.jetty12.AbstractInstrumentedHandler
getAsyncDispatches, getAsyncTimeouts, getMetricPrefix, getName, getResponseCodeMeter, handle, mark, requestTimer, setName, updateResponsesMethods inherited from class org.eclipse.jetty.server.Handler.Wrapper
getHandler, getInvocationType, setHandlerMethods inherited from class org.eclipse.jetty.server.Handler.AbstractContainer
findContainerOf, getDescendant, getDescendants, isDynamic, setDynamic, setServerMethods inherited from class org.eclipse.jetty.server.Handler.Abstract
destroy, getServerMethods inherited from class org.eclipse.jetty.util.component.ContainerLifeCycle
addBean, addBean, addEventListener, addManaged, contains, dump, dump, dump, dumpObjects, dumpStdErr, getBean, getBeans, getBeans, getContainedBeans, getContainedBeans, installBean, installBean, isAuto, isManaged, isUnmanaged, manage, removeBean, removeBeans, removeEventListener, setBeans, start, stop, unmanage, updateBean, updateBean, updateBeans, updateBeansMethods inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
getEventListeners, getState, getState, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, setEventListeners, start, stop, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.eclipse.jetty.util.component.Container
getCachedBeans, getEventListenersMethods inherited from interface org.eclipse.jetty.util.component.Destroyable
destroyMethods inherited from interface org.eclipse.jetty.util.component.Dumpable
dumpSelfMethods inherited from interface org.eclipse.jetty.util.component.Dumpable.DumpableContainer
isDumpableMethods inherited from interface org.eclipse.jetty.server.Handler
getServer, setServerMethods inherited from interface org.eclipse.jetty.server.Handler.Container
getContainer, getDescendant, getDescendants, getDescendantsMethods inherited from interface org.eclipse.jetty.server.Handler.Singleton
getHandlers, getTail, insertHandler, setHandlerMethods inherited from interface org.eclipse.jetty.util.component.LifeCycle
addEventListener, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeEventListener, start, stop
-
Constructor Details
-
InstrumentedEE10Handler
public InstrumentedEE10Handler(com.codahale.metrics.MetricRegistry registry) Create a new instrumented handler using a given metrics registry.- Parameters:
registry- the registry for the metrics
-
InstrumentedEE10Handler
Create a new instrumented handler using a given metrics registry.- Parameters:
registry- the registry for the metricsprefix- the prefix to use for the metrics names
-
InstrumentedEE10Handler
public InstrumentedEE10Handler(com.codahale.metrics.MetricRegistry registry, String prefix, com.codahale.metrics.annotation.ResponseMeteredLevel responseMeteredLevel) Create a new instrumented handler using a given metrics registry.- Parameters:
registry- the registry for the metricsprefix- the prefix to use for the metrics namesresponseMeteredLevel- the level to determine individual/aggregate response codes that are instrumented
-
-
Method Details
-
doStart
- Overrides:
doStartin classio.dropwizard.metrics.jetty12.AbstractInstrumentedHandler- Throws:
Exception
-
doStop
- Overrides:
doStopin classio.dropwizard.metrics.jetty12.AbstractInstrumentedHandler- Throws:
Exception
-
setupServletListeners
protected void setupServletListeners(org.eclipse.jetty.server.Request request, org.eclipse.jetty.server.Response response) - Specified by:
setupServletListenersin classio.dropwizard.metrics.jetty12.AbstractInstrumentedHandler
-
isSuspended
protected boolean isSuspended(org.eclipse.jetty.server.Request request, org.eclipse.jetty.server.Response response) - Specified by:
isSuspendedin classio.dropwizard.metrics.jetty12.AbstractInstrumentedHandler
-