Package ej.restserver
Interface RequestHandler
-
- All Known Implementing Classes:
EndpointHandler
public interface RequestHandlerA request handler is responsible of HTTP requests processing. It may or may not serve resources for a given HTTP request.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description HTTPResponseanswer(RestServer server, HTTPRequest request)Answers to the given HTTP request.
-
-
-
Method Detail
-
answer
HTTPResponse answer(RestServer server, HTTPRequest request)
Answers to the given HTTP request. Depending on request parameters, this handler may or may not returns a HTTP response.- Parameters:
server- the server handling the request.request- the HTTP request.- Returns:
- an HTTP response if this handler can process the HTTP request, or
nullotherwise.
-
-