I
- O
- public class RequestHandlerWithErrorMapper<I,O> extends java.lang.Object implements RequestHandler<I,O>
RequestHandler
with an accompanying ErrorResponseGenerator
.Constructor and Description |
---|
RequestHandlerWithErrorMapper(RequestHandler<I,O> handler,
rx.functions.Func1<java.lang.Throwable,ErrorResponseGenerator<O>> errorMapper) |
Modifier and Type | Method and Description |
---|---|
static <I,O> RequestHandlerWithErrorMapper<I,O> |
from(RequestHandler<I,O> handler,
rx.functions.Func1<java.lang.Throwable,ErrorResponseGenerator<O>> errorMapper) |
rx.Observable<java.lang.Void> |
handle(HttpServerRequest<I> request,
HttpServerResponse<O> response) |
public RequestHandlerWithErrorMapper(RequestHandler<I,O> handler, rx.functions.Func1<java.lang.Throwable,ErrorResponseGenerator<O>> errorMapper)
public static <I,O> RequestHandlerWithErrorMapper<I,O> from(RequestHandler<I,O> handler, rx.functions.Func1<java.lang.Throwable,ErrorResponseGenerator<O>> errorMapper)
public rx.Observable<java.lang.Void> handle(HttpServerRequest<I> request, HttpServerResponse<O> response)
handle
in interface Handler<HttpServerRequest<I>,HttpServerResponse<O>>
handle
in interface RequestHandler<I,O>