public abstract class AbstractJsonRequestHandler extends Object implements RequestHandler
Constructor and Description |
---|
AbstractJsonRequestHandler() |
Modifier and Type | Method and Description |
---|---|
abstract String |
handleJsonRequest(Map<String,String> pathParams,
Map<String,String> queryParams,
ActorGateway jobManager)
Core method that handles the request and generates the response.
|
io.netty.handler.codec.http.FullHttpResponse |
handleRequest(Map<String,String> pathParams,
Map<String,String> queryParams,
ActorGateway jobManager)
Core method that handles the request and generates the response.
|
public io.netty.handler.codec.http.FullHttpResponse handleRequest(Map<String,String> pathParams, Map<String,String> queryParams, ActorGateway jobManager) throws Exception
RequestHandler
Exceptions may be throws and will be handled.
handleRequest
in interface RequestHandler
pathParams
- The map of REST path parameters, decoded by the router.queryParams
- The map of query parameters.jobManager
- The JobManager actor.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.public abstract String handleJsonRequest(Map<String,String> pathParams, Map<String,String> queryParams, ActorGateway jobManager) throws Exception
pathParams
- The map of REST path parameters, decoded by the router.queryParams
- The map of query parameters.jobManager
- The JobManager actor.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.Copyright © 2014–2017 The Apache Software Foundation. All rights reserved.