uk.org.ury.backend.server
Class HttpHandler

java.lang.Object
  extended by uk.org.ury.backend.server.AbstractRequestHandler
      extended by uk.org.ury.backend.server.HttpHandler
All Implemented Interfaces:
org.apache.http.protocol.HttpRequestHandler

public class HttpHandler
extends AbstractRequestHandler
implements org.apache.http.protocol.HttpRequestHandler

Author:
Matt Windsor, Apache Software Foundation

Constructor Summary
HttpHandler(Server server, java.lang.String mount)
          Construct a new HttpHandler.
 
Method Summary
 void handleGet(org.apache.http.HttpRequest request, org.apache.http.HttpResponse response, org.apache.http.protocol.HttpContext context)
          Handle a HTTP GET request.
 
Methods inherited from class uk.org.ury.backend.server.AbstractRequestHandler
handle
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.http.protocol.HttpRequestHandler
handle
 

Constructor Detail

HttpHandler

public HttpHandler(Server server,
                   java.lang.String mount)
Construct a new HttpHandler.

Parameters:
server - The instance of the URY server responsible for the request.
mount - The directory to which this handler is to be mounted.
Method Detail

handleGet

public void handleGet(org.apache.http.HttpRequest request,
                      org.apache.http.HttpResponse response,
                      org.apache.http.protocol.HttpContext context)
               throws HandlerNotFoundException,
                      HandlerSetupFailureException,
                      HandleFailureException,
                      BadRequestException,
                      NotAHandlerException
Handle a HTTP GET request.

Parameters:
request - The HTTP request.
response - The response that the handler will populate during the handling of the request.
context - The HTTP context.
Throws:
HandlerNotFoundException - if the client requested a request handler that could not be found on the class path.
HandlerSetupFailureException - if the handler was found but could not be set up (eg does not implement appropriate interface or cannot be instantiated).
HandleFailureException - if an appropriate handler was contacted, but it failed to process the request.
BadRequestException - if the request was malformed or invalid.
NotAHandlerException - if the class requested to handle the request is not a handler.