uk.org.ury.library
Class LibraryRequestHandler
java.lang.Object
uk.org.ury.server.AbstractRequestHandler
uk.org.ury.library.LibraryRequestHandler
- All Implemented Interfaces:
- org.apache.http.protocol.HttpRequestHandler
public class LibraryRequestHandler
- extends AbstractRequestHandler
A request handler for library queries.
- Author:
- Matt Windsor
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 java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LibraryRequestHandler
public LibraryRequestHandler(Server server,
java.lang.String mount)
- Construct a new LibraryRequestHandler.
- Parameters:
server
- The instance of the URY server responsible for the request.mount
- The directory to which this handler is to be mounted.
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,
UnknownFunctionException
- 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.
UnknownFunctionException
- if the request is for a path that does not correspond to one
of this handler's functions.