public class RestSession
extends ej.hoka.http.HTTPSession
It loops over server active request handler to find the first one capable of handling the request and return its response.
Modifier and Type | Class and Description |
---|---|
static class |
RestSession.Factory
This class makes the creation of HTTPServer easier.
|
Constructor and Description |
---|
RestSession(RestServer server)
Creates a new REST session for given server.
|
Modifier and Type | Method and Description |
---|---|
protected ej.hoka.http.HTTPResponse |
answer(ej.hoka.http.HTTPRequest request)
Answers to the given request.
|
public RestSession(RestServer server)
server
- the underlying REST server.protected ej.hoka.http.HTTPResponse answer(ej.hoka.http.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.
answer
in class ej.hoka.http.HTTPSession