org.mortbay.http.handler

Class AbstractHttpHandler

Implemented Interfaces:
HttpHandler, LifeCycle, Serializable
Known Direct Subclasses:
DumpHandler, ErrorPageHandler, ExpiryHandler, ForwardHandler, HTAccessHandler, IPAccessHandler, MsieSslHandler, NotFoundHandler, NullHandler, ProxyHandler, ResourceHandler, SecurityHandler, SetResponseHeadersHandler

public abstract class AbstractHttpHandler
extends java.lang.Object
implements HttpHandler

Base HTTP Handler. This No-op handler is a good base for other handlers
Version:
$Id: AbstractHttpHandler.java,v 1.12 2005/08/13 00:01:26 gregwilkins Exp $
Author:
Greg Wilkins (gregw)

Method Summary

HttpContext
getHttpContext()
String
getName()
Get the name of the handler.
void
handleTrace(HttpRequest request, HttpResponse response)
void
initialize(HttpContext context)
Initialize with a HttpContext.
boolean
isStarted()
void
setName(String name)
void
start()
void
stop()
String
toString()

Method Details

getHttpContext

public HttpContext getHttpContext()
Specified by:
getHttpContext in interface HttpHandler

getName

public String getName()
Get the name of the handler.
Specified by:
getName in interface HttpHandler
Returns:
The name of the handler used for logging and reporting.

handleTrace

public void handleTrace(HttpRequest request,
                        HttpResponse response)
            throws IOException

initialize

public void initialize(HttpContext context)
Initialize with a HttpContext. Called by addHandler methods of HttpContext.
Specified by:
initialize in interface HttpHandler
Parameters:
context - Must be the HttpContext of the handler

isStarted

public boolean isStarted()
Specified by:
isStarted in interface LifeCycle

setName

public void setName(String name)

start

public void start()
            throws Exception
Specified by:
start in interface LifeCycle

stop

public void stop()
            throws InterruptedException
Specified by:
stop in interface LifeCycle

toString

public String toString()

Copyright © 2004 Mortbay Consulting Pty. Ltd. All Rights Reserved.