Save This Page
Home » apache-log4j-1.2.15 » com.psibt.framework » net » [javadoc | source]
com.psibt.framework.net
public interface: HTTPRequestHandler [javadoc | source]

All Known Implementing Classes:
    RootRequestHandler, UserDialogRequestHandler, Log4jRequestHandler

This interface defines all methods that have to be implemented for a HTTPRequestHandler for the PluggableHTTPServer.
Method from com.psibt.framework.net.HTTPRequestHandler Summary:
getDescription,   getHandledPath,   getTitle,   handleRequest,   setDescription,   setHandledPath,   setTitle
Method from com.psibt.framework.net.HTTPRequestHandler Detail:
 public String getDescription()
    Gets the description for html page
 public String getHandledPath()
    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 String getTitle()
    Gets the title for html page
 public boolean handleRequest(String request,
    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.
 public  void setDescription(String description)
    Sets the description for html page
 public  void setHandledPath(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  void setTitle(String title)
    Sets the title for html page