Class DebugListener

java.lang.Object
org.eclipse.jetty.util.component.AbstractLifeCycle
org.eclipse.jetty.server.DebugListener
All Implemented Interfaces:
EventListener, javax.servlet.ServletContextListener, org.eclipse.jetty.util.component.LifeCycle

@ManagedObject("Debug Listener") public class DebugListener extends org.eclipse.jetty.util.component.AbstractLifeCycle implements javax.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.StopException

    Nested 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

    Constructors
    Constructor
    Description
     
    DebugListener(boolean renameThread, boolean showHeaders, boolean dumpContext)
     
    DebugListener(OutputStream out, boolean renameThread, boolean showHeaders, boolean dumpContext)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    contextDestroyed(javax.servlet.ServletContextEvent sce)
     
    void
    contextInitialized(javax.servlet.ServletContextEvent sce)
     
    protected String
    findContextName(javax.servlet.ServletContext context)
     
    protected String
    findRequestName(javax.servlet.ServletRequest request)
     
    boolean
     
    boolean
     
    boolean
     
    protected void
    log(String format, Object... arg)
     
    void
    setDumpContext(boolean dumpContext)
     
    void
    setRenameThread(boolean renameThread)
     
    void
    setShowHeaders(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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • 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(javax.servlet.ServletContextEvent sce)
      Specified by:
      contextInitialized in interface javax.servlet.ServletContextListener
    • contextDestroyed

      public void contextDestroyed(javax.servlet.ServletContextEvent sce)
      Specified by:
      contextDestroyed in interface javax.servlet.ServletContextListener
    • findContextName

      protected String findContextName(javax.servlet.ServletContext context)
    • findRequestName

      protected String findRequestName(javax.servlet.ServletRequest request)
    • log

      protected void log(String format, Object... arg)