public class RestSession extends HTTPSession
It loops over server active request handler to find the first one capable of handling the request and return its response.
|Constructor and Description|
Creates a new REST session for given server.
|Modifier and Type||Method and Description|
Answers to the given request.
checkHTTPError, closeConnection, createErrorResponse, getAcceptEncodingHandler, getBodyParserFactory, getRunnable, sendError, sendError, sendResponse, setBodyParserFactory, setCurrentConnection, writeResponse
public RestSession(RestServer server)
server- the underlying REST server.
protected HTTPResponse answer(HTTPRequest request)
Active server request resolvers are invokes one by one in order to respond to given request. Returned response is the one by the first resolver accepting to respond to the request.