handleRequest
public String handleRequest(Map<String,String> pathParams,
Map<String,String> queryParams,
ActorGateway jobManager)
throws Exception
Core method that handles the request and generates the response. The method needs to
respond with a valid JSON string. Exceptions may be throws and will be handled.
- Specified by:
handleRequest
in interface RequestHandler
- Parameters:
pathParams
- The map of REST path parameters, decoded by the router.
queryParams
- The map of query parameters.
jobManager
- The JobManager actor.
- Returns:
- The JSON string that is the HTTP response.
- Throws:
Exception
- Handlers may forward exceptions. Exceptions of type
NotFoundException
will cause a HTTP 404
response with the exception message, other exceptions will cause a HTTP 500 response
with the exception stack trace.