return entityResponseWriter.getType();
}
@Override
public void handle(RestxRequestMatch match, RestxRequest req, RestxResponse resp, RestxContext ctx) throws IOException {
RouteLifecycleListener lifecycleListener = ctx.getLifecycleListener();
resp.setLogLevel(logLevel);
lifecycleListener.onRouteMatch(this, req, resp);
I input = entityRequestBodyReader.readBody(req, ctx);
Optional<I> optionalInput = Optional.fromNullable(input);
lifecycleListener.onEntityInput(this, req, resp, optionalInput);
Optional<O> result = doRoute(req, match, input);
lifecycleListener.onEntityOutput(this, req, resp, optionalInput, result);
if (result.isPresent()) {
entityResponseWriter.sendResponse(getSuccessStatus(), result.get(), req, resp, ctx);
} else {
notFound(match, resp);
}