uk.org.ury.backend.server
Class AbstractRequestHandler
java.lang.Object
uk.org.ury.backend.server.AbstractRequestHandler
- All Implemented Interfaces:
- org.apache.http.protocol.HttpRequestHandler
- Direct Known Subclasses:
- HttpHandler, LibraryRequestHandler
public abstract class AbstractRequestHandler
- extends java.lang.Object
- implements org.apache.http.protocol.HttpRequestHandler
An abstract request handler for HttpCore, providing basic functionality such
as uniform error response.
- Author:
- Matt Windsor
Method Summary |
void |
handle(org.apache.http.HttpRequest request,
org.apache.http.HttpResponse response,
org.apache.http.protocol.HttpContext context)
Begins handling of a HTTP request. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractRequestHandler
public AbstractRequestHandler(Server server,
java.lang.String mount)
- Constructs a new AbstractRequestHandler.
Obviously, this class cannot be instantiated directly.
- Parameters:
server
- The instance of the URY server responsible for the request.mount
- The directory to which this handler is to be mounted.
handle
public void handle(org.apache.http.HttpRequest request,
org.apache.http.HttpResponse response,
org.apache.http.protocol.HttpContext context)
throws org.apache.http.HttpException,
java.io.IOException
- Begins handling of a HTTP request.
- Specified by:
handle
in interface org.apache.http.protocol.HttpRequestHandler
- Parameters:
request
- The HTTP request.response
- The response that the handler will populate during the
handling of the request.context
- The HTTP context.
- Throws:
org.apache.http.HttpException
java.io.IOException