Package io.dropwizard.metrics5.jetty11
Class InstrumentedHandler
- java.lang.Object
-
- org.eclipse.jetty.util.component.AbstractLifeCycle
-
- org.eclipse.jetty.util.component.ContainerLifeCycle
-
- org.eclipse.jetty.server.handler.AbstractHandler
-
- org.eclipse.jetty.server.handler.AbstractHandlerContainer
-
- org.eclipse.jetty.server.handler.HandlerWrapper
-
- io.dropwizard.metrics5.jetty11.InstrumentedHandler
-
- All Implemented Interfaces:
org.eclipse.jetty.server.Handler,org.eclipse.jetty.server.HandlerContainer,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
public class InstrumentedHandler extends org.eclipse.jetty.server.handler.HandlerWrapperA JettyHandlerwhich records various metrics about an underlyingHandlerinstance.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.eclipse.jetty.server.handler.AbstractHandler
org.eclipse.jetty.server.handler.AbstractHandler.ErrorDispatchHandler
-
Nested classes/interfaces inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
org.eclipse.jetty.util.component.AbstractLifeCycle.AbstractLifeCycleListener, org.eclipse.jetty.util.component.AbstractLifeCycle.StopException
-
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Container
org.eclipse.jetty.util.component.Container.InheritedListener, org.eclipse.jetty.util.component.Container.Listener
-
-
Constructor Summary
Constructors Constructor Description InstrumentedHandler(io.dropwizard.metrics5.MetricRegistry registry)Create a new instrumented handler using a given metrics registry.InstrumentedHandler(io.dropwizard.metrics5.MetricRegistry registry, String prefix)Create a new instrumented handler using a given metrics registry.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddoStart()protected voiddoStop()StringgetName()voidhandle(String path, org.eclipse.jetty.server.Request request, jakarta.servlet.http.HttpServletRequest httpRequest, jakarta.servlet.http.HttpServletResponse httpResponse)voidsetName(String name)-
Methods inherited from class org.eclipse.jetty.server.handler.HandlerWrapper
destroy, expandChildren, getHandler, getHandlers, insertHandler, setHandler
-
Methods inherited from class org.eclipse.jetty.server.handler.AbstractHandlerContainer
expandHandler, findContainerOf, getChildHandlerByClass, getChildHandlers, getChildHandlersByClass, setServer
-
Methods inherited from class org.eclipse.jetty.util.component.ContainerLifeCycle
addBean, addBean, addEventListener, addManaged, contains, dump, dump, dump, dumpObjects, dumpStdErr, getBean, getBeans, getBeans, getContainedBeans, getContainedBeans, isAuto, isManaged, isUnmanaged, manage, removeBean, removeBeans, removeEventListener, setBeans, start, stop, unmanage, updateBean, updateBean, updateBeans, updateBeans
-
Methods inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
getEventListeners, getState, getState, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, setEventListeners, start, stop, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.eclipse.jetty.util.component.Container
getCachedBeans, getEventListeners
-
-
-
-
Constructor Detail
-
InstrumentedHandler
public InstrumentedHandler(io.dropwizard.metrics5.MetricRegistry registry)
Create a new instrumented handler using a given metrics registry.- Parameters:
registry- the registry for the metrics
-
InstrumentedHandler
public InstrumentedHandler(io.dropwizard.metrics5.MetricRegistry registry, String prefix)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
-
-
Method Detail
-
getName
public String getName()
-
setName
public void setName(String name)
-
doStart
protected void doStart() throws Exception- Overrides:
doStartin classorg.eclipse.jetty.server.handler.AbstractHandler- Throws:
Exception
-
doStop
protected void doStop() throws Exception- Overrides:
doStopin classorg.eclipse.jetty.server.handler.AbstractHandler- Throws:
Exception
-
handle
public void handle(String path, org.eclipse.jetty.server.Request request, jakarta.servlet.http.HttpServletRequest httpRequest, jakarta.servlet.http.HttpServletResponse httpResponse) throws IOException, jakarta.servlet.ServletException
- Specified by:
handlein interfaceorg.eclipse.jetty.server.Handler- Overrides:
handlein classorg.eclipse.jetty.server.handler.HandlerWrapper- Throws:
IOExceptionjakarta.servlet.ServletException
-
-