uk.org.ury.server
Class ServerRequestHandler
java.lang.Object
uk.org.ury.server.ServerRequestHandler
- All Implemented Interfaces:
- ApiRequestHandler
public class ServerRequestHandler
- extends java.lang.Object
- implements ApiRequestHandler
A request handler for server queries.
- Author:
- Matt Windsor
Method Summary |
java.util.Map<java.lang.String,java.lang.Object> |
handleGetRequest(java.util.Map<java.lang.String,java.lang.String> parameters,
Server server)
Handle a server GET request (that is, a request for data
output). |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ServerRequestHandler
public ServerRequestHandler()
handleGetRequest
public java.util.Map<java.lang.String,java.lang.Object> handleGetRequest(java.util.Map<java.lang.String,java.lang.String> parameters,
Server server)
throws HandleFailureException
- Handle a server GET request (that is, a request for data
output).
- Specified by:
handleGetRequest
in interface ApiRequestHandler
- Parameters:
parameters
- A key-value map of parameters supplied with
the server request. Typically, the function
parameter will detail the function that the
request handler is expected to perform.server
- The server from which the request originated.
This will be able to provide the handler with
pooled resources, for example the database.
- Returns:
- A list of lines to return in the body of the
server's response to the client.
- Throws:
HandleFailureException
- if the handler cannot
handle the request.