@FunctionalInterface
public interface HttpService
extends AsyncCloseable
| Modifier and Type | Method and Description |
|---|---|
default Completable |
closeAsync()
Closes this
HttpService asynchronously. |
Single<HttpResponse> |
handle(HttpServiceContext ctx,
HttpRequest request,
HttpResponseFactory responseFactory)
Handles a single HTTP request.
|
Single<HttpResponse> handle(HttpServiceContext ctx, HttpRequest request, HttpResponseFactory responseFactory)
ctx - Context of the service.request - to handle.responseFactory - used to create HttpResponse objects.Single of HTTP response.default Completable closeAsync()
HttpService asynchronously.closeAsync in interface AsyncCloseableCompletable that when subscribed will close this HttpService.