Package ej.restserver
Class EndpointHandler
- java.lang.Object
-
- ej.restserver.EndpointHandler
-
- All Implemented Interfaces:
RequestHandler
public class EndpointHandler extends Object implements RequestHandler
An endpoint handler handles GET, POST, PUT and DELETE operations on server endpoints.- See Also:
RestEndpoint,RestServer.addEndpoint(RestEndpoint)
-
-
Constructor Summary
Constructors Constructor Description EndpointHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HTTPResponseanswer(RestServer server, HTTPRequest request)Answers to the given HTTP request.
-
-
-
Method Detail
-
answer
public HTTPResponse answer(RestServer server, HTTPRequest request)
Description copied from interface:RequestHandlerAnswers to the given HTTP request. Depending on request parameters, this handler may or may not returns a HTTP response.- Specified by:
answerin interfaceRequestHandler- 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.
-
-