## org.mortbay.jetty
Interface Handler

All Superinterfaces:
  LifeCycle

All Known Implementing Classes:
  AbstractHandler, AbstractHandlerContainer, Context, ContextHandler, ContextHandlerCollection, DefaultHandler, ErrorHandler, ErrorPageErrorHandler, HandlerCollection, HandlerList, HandlerWrapper, HTAccessHandler, Jetty6PluginWebAppContext, JettyFactoryBean, ManyContexts.HelloHandler, ManyHandlers.HelloHandler, ManyHandlers.ParamHandler, MovedContextHandler, OneContext.HelloHandler, OneHandler.HelloHandler, RequestLogHandler, ResourceHandler, RewriteHandler, SecurityHandler, Server, ServletHandler, ServletHandler, SessionHandler, StatisticsHandler, WebAppContext

    public interface Handler

extends LifeCycle

Field Summary
`static int` `ALL`
`static int` `DEFAULT` Dispatch types
`static int` `ERROR`
`static int` `FORWARD`
`static int` `INCLUDE`
`static int` `REQUEST`

Method Summary
`void` `destroy()`
`Server` `getServer()`
`void` `handle(String target, HttpServletRequest request, HttpServletResponse response, int dispatch)` Handle a request.
`void` `setServer(Server server)`

Methods inherited from interface org.mortbay.component.LifeCycle
`isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, start, stop`

Field Detail

### DEFAULT

    static final int DEFAULT

  Dispatch types

  See Also:
    Constant Field Values

### REQUEST

    static final int REQUEST

See Also:
  Constant Field Values

### FORWARD

    static final int FORWARD

See Also:
  Constant Field Values

### INCLUDE

    static final int INCLUDE

See Also:
  Constant Field Values

### ERROR

    static final int ERROR

See Also:
  Constant Field Values

### ALL

    static final int ALL

See Also:
  Constant Field Values

Method Detail

### handle

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

  Handle a request.

  Parameters:
    `target` - The target of the request - either a URI or a name.
    `request` - 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` - 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` - The dispatch mode: `REQUEST`, `FORWARD`, `INCLUDE`, `ERROR`
  Throws:
    `IOException`
    `ServletException`

### setServer

    void setServer(Server server)

### getServer

    Server getServer()

### destroy

    void destroy()

Copyright © 2007 Mort Bay Consulting. All Rights Reserved.