Package org.eclipse.jetty.ee8.nested
Class DebugHandler
- All Implemented Interfaces:
EventListener,Handler,HandlerContainer,Connection.Listener,Container,Destroyable,Dumpable,Dumpable.DumpableContainer,LifeCycle
Debug Handler.
A lightweight debug handler that can be used in production code.
Details of the request and response are written to an output stream
and the current thread name is updated with information that will link
to the details in that output.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.eclipse.jetty.ee8.nested.AbstractHandler
AbstractHandler.ErrorDispatchHandlerNested classes/interfaces inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
AbstractLifeCycle.AbstractLifeCycleListener, AbstractLifeCycle.StopExceptionNested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Container
Container.InheritedListener, Container.ListenerNested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Dumpable
Dumpable.DumpableContainer, Dumpable.DumpAppendableNested classes/interfaces inherited from interface org.eclipse.jetty.util.component.LifeCycle
LifeCycle.Listener -
Field Summary
Fields inherited from class org.eclipse.jetty.ee8.nested.HandlerWrapper
_handler -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddoStart()Starts the managed lifecycle beans in the order they were added.protected voiddoStop()Stops the managed lifecycle beans in the reverse order they were added.Get the out.voidhandle(String target, Request baseRequest, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) Handle a request.voidonClosed(Connection connection) voidonOpened(Connection connection) voidSet the out to set.Methods inherited from class org.eclipse.jetty.ee8.nested.HandlerWrapper
destroy, expandChildren, getHandler, getHandlers, getTail, insertHandler, setAsParent, setHandlerMethods inherited from class org.eclipse.jetty.ee8.nested.AbstractHandlerContainer
expandHandler, findContainerOf, getChildHandlerByClass, getChildHandlers, getChildHandlersByClass, setServerMethods inherited from class org.eclipse.jetty.ee8.nested.AbstractHandler
doError, 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.Dumpable.DumpableContainer
isDumpableMethods inherited from interface org.eclipse.jetty.util.component.LifeCycle
addEventListener, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeEventListener, start, stop
-
Constructor Details
-
DebugHandler
public DebugHandler()
-
-
Method Details
-
handle
public void handle(String target, Request baseRequest, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws IOException, javax.servlet.ServletException Description copied from interface:HandlerHandle a request.- Specified by:
handlein interfaceHandler- Overrides:
handlein classHandlerWrapper- Parameters:
target- The target of the request - either a URI or a name.baseRequest- The original unwrapped request object.request- The request either as theRequestobject or a wrapper of that request.response- The response as theResponseobject or a wrapper of that request.- Throws:
IOException- if unable to handle the request or response processingjavax.servlet.ServletException- if unable to handle the request or response due to underlying servlet issue
-
doStart
Description copied from class:ContainerLifeCycleStarts the managed lifecycle beans in the order they were added.- Overrides:
doStartin classAbstractHandler- Throws:
AbstractLifeCycle.StopException- If thrown, the lifecycle will immediately be stopped.Exception- If there was a problem starting. Will cause a transition to FAILED state
-
doStop
Description copied from class:ContainerLifeCycleStops the managed lifecycle beans in the reverse order they were added.- Overrides:
doStopin classAbstractHandler- Throws:
Exception- If there was a problem stopping. Will cause a transition to FAILED state
-
getOutputStream
Get the out.- Returns:
- the out
-
setOutputStream
Set the out to set.- Parameters:
out- the out to set
-
onOpened
- Specified by:
onOpenedin interfaceConnection.Listener
-
onClosed
- Specified by:
onClosedin interfaceConnection.Listener
-