FileDocCategorySizeDatePackage
HTTPRequestHandler.javaAPI DocApache log4j 1.2.152735Sat Aug 25 00:09:34 BST 2007com.psibt.framework.net

HTTPRequestHandler

public interface HTTPRequestHandler
This interface defines all methods that have to be implemented for a HTTPRequestHandler for the PluggableHTTPServer.
author
Volker Mentzner

Fields Summary
Constructors Summary
Methods Summary
public java.lang.StringgetDescription()
Gets the description for html page

public java.lang.StringgetHandledPath()
Gets the virtual path in the HTTP server that ist handled in this HTTPRequestHandler. So the root path handler will return "/" (without brackets) because it handles the path "http://servername/" or a handler for "http://servername/somepath/" will return "/somepath/" It is important to include the trailing "/" because all HTTPRequestHandler have to serve a path!

public java.lang.StringgetTitle()
Gets the title for html page

public booleanhandleRequest(java.lang.String request, java.io.Writer out)
Handles the given request and writes the reply to the given out-stream. Every handler has to check the request for the right path info.

param
request - client browser request
param
out - Out stream for sending data to client browser
return
if the request was handled by this handler : true, else : false

public voidsetDescription(java.lang.String description)
Sets the description for html page

public voidsetHandledPath(java.lang.String path)
Sets the virtual path in the HTTP server that ist handled in this HTTPRequestHandler. So set the path to "/" for the root path handler because it handles the path "http://servername/" or set it to "/somepath/" for a handler for "http://servername/somepath/". It is important to include the trailing "/" because all HTTPRequestHandler have to serve a path!

public voidsetTitle(java.lang.String title)
Sets the title for html page