Package org.eclipse.jetty.server
Class DebugListener
- java.lang.Object
-
- org.eclipse.jetty.util.component.AbstractLifeCycle
-
- org.eclipse.jetty.server.DebugListener
-
- All Implemented Interfaces:
EventListener,ServletContextListener,org.eclipse.jetty.util.component.LifeCycle
@ManagedObject("Debug Listener") public class DebugListener extends org.eclipse.jetty.util.component.AbstractLifeCycle implements ServletContextListenerA 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 byServletContextListener,ServletRequestListener,AsyncListenerandContextHandler.ContextScopeListenerare logged.
-
-
Constructor Summary
Constructors Constructor Description DebugListener()DebugListener(boolean renameThread, boolean showHeaders, boolean dumpContext)DebugListener(OutputStream out, boolean renameThread, boolean showHeaders, boolean dumpContext)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcontextDestroyed(ServletContextEvent sce)voidcontextInitialized(ServletContextEvent sce)protected StringfindContextName(ServletContext context)protected StringfindRequestName(ServletRequest request)booleanisDumpContext()booleanisRenameThread()booleanisShowHeaders()protected voidlog(String format, Object... arg)voidsetDumpContext(boolean dumpContext)voidsetRenameThread(boolean renameThread)voidsetShowHeaders(boolean showHeaders)
-
-
-
Constructor Detail
-
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 Detail
-
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(ServletContextEvent sce)
- Specified by:
contextInitializedin interfaceServletContextListener
-
contextDestroyed
public void contextDestroyed(ServletContextEvent sce)
- Specified by:
contextDestroyedin interfaceServletContextListener
-
findContextName
protected String findContextName(ServletContext context)
-
findRequestName
protected String findRequestName(ServletRequest request)
-
-