@ManagedObject(value="Debug Listener") public class DebugListener extends AbstractLifeCycle implements ServletContextListener
ServletContextListener
, ServletRequestListener
,
AsyncListener
and ContextHandler.ContextScopeListener
are logged.AbstractLifeCycle.AbstractLifeCycleListener
LifeCycle.Listener
FAILED, RUNNING, STARTED, STARTING, STOP_ON_FAILURE, STOPPED, STOPPING
Constructor and Description |
---|
DebugListener() |
DebugListener(boolean renameThread,
boolean showHeaders,
boolean dumpContext) |
DebugListener(OutputStream out,
boolean renameThread,
boolean showHeaders,
boolean dumpContext) |
Modifier and Type | Method and Description |
---|---|
void |
contextDestroyed(ServletContextEvent sce) |
void |
contextInitialized(ServletContextEvent sce) |
protected String |
findContextName(ServletContext context) |
protected String |
findRequestName(ServletRequest request) |
boolean |
isDumpContext() |
boolean |
isRenameThread() |
boolean |
isShowHeaders() |
protected void |
log(String format,
Object... arg) |
void |
setDumpContext(boolean dumpContext) |
void |
setRenameThread(boolean renameThread) |
void |
setShowHeaders(boolean showHeaders) |
addLifeCycleListener, doStart, doStop, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, setStopTimeout, start, stop
public DebugListener()
public DebugListener(@Name(value="renameThread") boolean renameThread, @Name(value="showHeaders") boolean showHeaders, @Name(value="dumpContext") boolean dumpContext)
@ManagedAttribute(value="Rename thread within context scope") public boolean isRenameThread()
public void setRenameThread(boolean renameThread)
@ManagedAttribute(value="Show request headers") public boolean isShowHeaders()
public void setShowHeaders(boolean showHeaders)
@ManagedAttribute(value="Dump contexts at start") public boolean isDumpContext()
public void setDumpContext(boolean dumpContext)
public void contextInitialized(ServletContextEvent sce)
contextInitialized
in interface ServletContextListener
public void contextDestroyed(ServletContextEvent sce)
contextDestroyed
in interface ServletContextListener
protected String findContextName(ServletContext context)
protected String findRequestName(ServletRequest request)
Copyright © 1995–2017 Webtide. All rights reserved.