org.mortbay.http
Interface HttpHandler
- LifeCycle, Serializable
- AbstractHttpHandler, DumpHandler, ErrorPageHandler, ExpiryHandler, ForwardHandler, HttpContext, HTAccessHandler, IPAccessHandler, MsieSslHandler, NotFoundHandler, NullHandler, PlusWebAppContext, ProxyHandler, ResourceHandler, RootNotFoundHandler, SecurityHandler, ServletHandler, ServletHttpContext, SetResponseHeadersHandler, WebApplicationContext, WebApplicationHandler
public interface HttpHandler
HTTP handler.
The HTTP Handler interface is implemented by classes that wish to
receive and handle requests from the HttpServer. The handle method
is called for each request and the handler may ignore, modify or
handle the request.
Examples of HttpHandler instances include:
- org.mortbay.http.handler.ResourceHandler
- org.mortbay.jetty.servlet.ServletHandler
$Id: HttpHandler.java,v 1.11 2005/03/15 10:03:40 gregwilkins Exp $
getName
public String getName()
Get the name of the handler.
- The name of the handler used for logging and reporting.
handle
public void handle(String pathInContext,
String pathParams,
HttpRequest request,
HttpResponse response)
throws HttpException,
IOException
Handle a request.
Note that Handlers are tried in order until one has handled the
request. i.e. until request.isHandled() returns true.
In broad terms this means, either a response has been commited
or request.setHandled(true) has been called.
pathInContext
- The context pathpathParams
- Path parameters such as encoded Session IDrequest
- The HttpRequest requestresponse
- The HttpResponse response
Copyright © 2004 Mortbay Consulting Pty. Ltd. All Rights Reserved.