java.lang.Object
org.eclipse.jetty.util.component.AbstractLifeCycle
org.eclipse.jetty.server.DebugListener
- All Implemented Interfaces:
jakarta.servlet.ServletContextListener,EventListener,org.eclipse.jetty.util.component.LifeCycle
@ManagedObject("Debug Listener")
public class DebugListener
extends org.eclipse.jetty.util.component.AbstractLifeCycle
implements jakarta.servlet.ServletContextListener
A Context Listener that produces additional debug.
This listener if added to a ContextHandler, will produce additional debug information to
either/or a specific log stream or the standard debug log.
The events produced by
ServletContextListener, ServletRequestListener,
AsyncListener and ContextHandler.ContextScopeListener are logged.-
Nested Class Summary
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.StopExceptionNested classes/interfaces inherited from interface org.eclipse.jetty.util.component.LifeCycle
org.eclipse.jetty.util.component.LifeCycle.Listener -
Field Summary
Fields inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
FAILED, STARTED, STARTING, STOPPED, STOPPING -
Constructor Summary
ConstructorsConstructorDescriptionDebugListener(boolean renameThread, boolean showHeaders, boolean dumpContext) DebugListener(OutputStream out, boolean renameThread, boolean showHeaders, boolean dumpContext) -
Method Summary
Modifier and TypeMethodDescriptionvoidcontextDestroyed(jakarta.servlet.ServletContextEvent sce) voidcontextInitialized(jakarta.servlet.ServletContextEvent sce) protected StringfindContextName(jakarta.servlet.ServletContext context) protected StringfindRequestName(jakarta.servlet.ServletRequest request) booleanbooleanbooleanprotected voidvoidsetDumpContext(boolean dumpContext) voidsetRenameThread(boolean renameThread) voidsetShowHeaders(boolean showHeaders) Methods inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
addEventListener, doStart, doStop, getEventListeners, getState, getState, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeEventListener, setEventListeners, start, stop, toString
-
Constructor Details
-
DebugListener
public DebugListener() -
DebugListener
public DebugListener(@Name("renameThread") boolean renameThread, @Name("showHeaders") boolean showHeaders, @Name("dumpContext") boolean dumpContext) -
DebugListener
public DebugListener(@Name("outputStream") OutputStream out, @Name("renameThread") boolean renameThread, @Name("showHeaders") boolean showHeaders, @Name("dumpContext") boolean dumpContext)
-
-
Method Details
-
isRenameThread
@ManagedAttribute("Rename thread within context scope") public boolean isRenameThread() -
setRenameThread
public void setRenameThread(boolean renameThread) -
isShowHeaders
@ManagedAttribute("Show request headers") public boolean isShowHeaders() -
setShowHeaders
public void setShowHeaders(boolean showHeaders) -
isDumpContext
@ManagedAttribute("Dump contexts at start") public boolean isDumpContext() -
setDumpContext
public void setDumpContext(boolean dumpContext) -
contextInitialized
public void contextInitialized(jakarta.servlet.ServletContextEvent sce) - Specified by:
contextInitializedin interfacejakarta.servlet.ServletContextListener
-
contextDestroyed
public void contextDestroyed(jakarta.servlet.ServletContextEvent sce) - Specified by:
contextDestroyedin interfacejakarta.servlet.ServletContextListener
-
findContextName
-
findRequestName
-
log
-