Top Description Fields Constructors Methods
org.mortbay.jetty.handler

public Class DebugHandler

extends HandlerWrapper
Class Inheritance
Imports
java.io.IOException, .OutputStream, .PrintStream, java.util.Locale, javax.servlet.ServletException, javax.servlet.http.HttpServletRequest, .HttpServletResponse, org.mortbay.jetty.Request, .Response, .RetryRequest, org.mortbay.util.DateCache, .RolloverFileOutputStream

Debug Handler. A lightweight debug handler that can be used in production code. Details of the request and response are written to an output stream and the current thread name is updated with information that will link to the details in that output.

Field Summary

Modifier and TypeField and Description
private DateCache
private OutputStream
private PrintStream

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected void
protected void
public OutputStream

Returns:

the out
getOutputStream
()

public void
handle(String
The target of the request - either a URI or a name.
target
,
HttpServletRequest
The request either as the Request object or a wrapper of that request. The HttpConnection#getCurrentConnection() method can be used access the Request object if required.
request
,
HttpServletResponse
The response as the Response object or a wrapper of that request. The HttpConnection#getCurrentConnection() method can be used access the Response object if required.
response
,
int
The dispatch mode: REQUEST, FORWARD, INCLUDE, ERROR
dispatch
)

Overrides org.mortbay.jetty.handler.HandlerWrapper.handle.

Implements org.mortbay.jetty.Handler.handle.

Handle a request.
public void
setOutputStream(OutputStream
the out to set
out
)

Inherited from org.mortbay.jetty.handler.HandlerWrapper:
addHandlerexpandChildrengetHandlerremoveHandlersetHandlersetServer

Field Detail

_dateback to summary
private DateCache _date
_outback to summary
private OutputStream _out
_printback to summary
private PrintStream _print

Constructor Detail

DebugHandlerback to summary
public DebugHandler()

Method Detail

doStartback to summary
protected void doStart() throws Exception

Overrides org.mortbay.jetty.handler.HandlerWrapper.doStart.

doStopback to summary
protected void doStop() throws Exception

Overrides org.mortbay.jetty.handler.HandlerWrapper.doStop.

getOutputStreamback to summary
public OutputStream getOutputStream()
Returns:OutputStream

the out

handleback to summary
public void handle(String target, HttpServletRequest request, HttpServletResponse response, int dispatch) throws IOException, ServletException

Overrides org.mortbay.jetty.handler.HandlerWrapper.handle.

Implements org.mortbay.jetty.Handler.handle.

Doc from org.mortbay.jetty.Handler.handle.

Handle a request.

Parameters
target:String

The target of the request - either a URI or a name.

request:HttpServletRequest

The request either as the Request object or a wrapper of that request. The HttpConnection#getCurrentConnection() method can be used access the Request object if required.

response:HttpServletResponse

The response as the Response object or a wrapper of that request. The HttpConnection#getCurrentConnection() method can be used access the Response object if required.

dispatch:int

The dispatch mode: REQUEST, FORWARD, INCLUDE, ERROR

setOutputStreamback to summary
public void setOutputStream(OutputStream out)
Parameters
out:OutputStream

the out to set