Package org.eclipse.jetty.server
Class DebugListener
- java.lang.Object
-
- org.eclipse.jetty.util.component.AbstractLifeCycle
-
- org.eclipse.jetty.server.DebugListener
-
- All Implemented Interfaces:
java.util.EventListener
,javax.servlet.ServletContextListener
,LifeCycle
@ManagedObject("Debug Listener") public class DebugListener extends 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 byServletContextListener
,ServletRequestListener
,AsyncListener
andContextHandler.ContextScopeListener
are logged.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
AbstractLifeCycle.AbstractLifeCycleListener
-
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.LifeCycle
LifeCycle.Listener
-
-
Constructor Summary
Constructors Constructor Description DebugListener()
DebugListener(boolean renameThread, boolean showHeaders, boolean dumpContext)
DebugListener(java.io.OutputStream out, boolean renameThread, boolean showHeaders, boolean dumpContext)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
contextDestroyed(javax.servlet.ServletContextEvent sce)
void
contextInitialized(javax.servlet.ServletContextEvent sce)
protected java.lang.String
findContextName(javax.servlet.ServletContext context)
protected java.lang.String
findRequestName(javax.servlet.ServletRequest request)
boolean
isDumpContext()
boolean
isRenameThread()
boolean
isShowHeaders()
protected void
log(java.lang.String format, java.lang.Object... arg)
void
setDumpContext(boolean dumpContext)
void
setRenameThread(boolean renameThread)
void
setShowHeaders(boolean showHeaders)
-
Methods inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
addLifeCycleListener, doStart, doStop, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, setStopTimeout, start, stop, toString
-
-
-
-
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(javax.servlet.ServletContextEvent sce)
- Specified by:
contextInitialized
in interfacejavax.servlet.ServletContextListener
-
contextDestroyed
public void contextDestroyed(javax.servlet.ServletContextEvent sce)
- Specified by:
contextDestroyed
in interfacejavax.servlet.ServletContextListener
-
findContextName
protected java.lang.String findContextName(javax.servlet.ServletContext context)
-
findRequestName
protected java.lang.String findRequestName(javax.servlet.ServletRequest request)
-
log
protected void log(java.lang.String format, java.lang.Object... arg)
-
-