Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.mortbay.http
Interface HttpHandler  view HttpHandler download HttpHandler.java

All Superinterfaces:
org.mortbay.util.LifeCycle, java.io.Serializable
All Known Implementing Classes:
org.mortbay.http.handler.AbstractHttpHandler, HttpContext

public interface HttpHandler
extends org.mortbay.util.LifeCycle, java.io.Serializable

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:

Version:
$Id: HttpHandler.java,v 1.8 2003/09/18 13:29:21 gregwilkins Exp $

Method Summary
 HttpContext getHttpContext()
           
 java.lang.String getName()
          Get the name of the handler.
 void handle(java.lang.String pathInContext, java.lang.String pathParams, HttpRequest request, HttpResponse response)
          Handle a request.
 void initialize(HttpContext context)
           
 
Methods inherited from interface org.mortbay.util.LifeCycle
isStarted, start, stop
 

Method Detail

getName

public java.lang.String getName()
Get the name of the handler.


getHttpContext

public HttpContext getHttpContext()

initialize

public void initialize(HttpContext context)

handle

public void handle(java.lang.String pathInContext,
                   java.lang.String pathParams,
                   HttpRequest request,
                   HttpResponse response)
            throws HttpException,
                   java.io.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.