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

public Class HandlerCollection

extends AbstractHandlerContainer
Class Inheritance
Known Direct Subclasses
org.mortbay.jetty.handler.HandlerList, org.mortbay.jetty.handler.ContextHandlerCollection
Imports
java.io.IOException, javax.servlet.ServletException, javax.servlet.http.HttpServletRequest, .HttpServletResponse, org.mortbay.jetty.Handler, .Server, org.mortbay.util.LazyList, .MultiException

A collection of handlers. For each request, all handler are called, regardless of the response status or exceptions.
Author
gregw

Field Summary

Modifier and TypeField and Description
private Handler[]

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
protected void
protected void
protected Object
public Handler[]

Returns:

Returns the handlers.
getHandlers
()

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
)

Implements org.mortbay.jetty.Handler.handle.

Handle a request.
public void
public void
setHandlers(Handler[]
The handlers to set.
handlers
)

public void
Inherited from org.mortbay.jetty.handler.AbstractHandlerContainer:
expandHandlergetChildHandlerByClassgetChildHandlersgetChildHandlersByClass

Field Detail

_handlersback to summary
private Handler[] _handlers

Constructor Detail

HandlerCollectionback to summary
public HandlerCollection()

Method Detail

addHandlerback to summary
public void addHandler(Handler handler)

Implements org.mortbay.jetty.HandlerContainer.addHandler.

doStartback to summary
protected void doStart() throws Exception

Overrides org.mortbay.jetty.handler.AbstractHandler.doStart.

doStopback to summary
protected void doStop() throws Exception

Overrides org.mortbay.jetty.handler.AbstractHandler.doStop.

expandChildrenback to summary
protected Object expandChildren(Object list, Class<T> byClass)

Overrides org.mortbay.jetty.handler.AbstractHandlerContainer.expandChildren.

getHandlersback to summary
public Handler[] getHandlers()
Returns:Handler[]

Returns the handlers.

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

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

removeHandlerback to summary
public void removeHandler(Handler handler)

Implements org.mortbay.jetty.HandlerContainer.removeHandler.

setHandlersback to summary
public void setHandlers(Handler[] handlers)
Parameters
handlers:Handler[]

The handlers to set.

setServerback to summary
public void setServer(Server server)

Overrides org.mortbay.jetty.handler.AbstractHandler.setServer.

Implements org.mortbay.jetty.Handler.setServer.