@FunctionalInterface public interface HttpService extends AsyncCloseable, HttpExecutionStrategyInfluencer
| 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.
|
default HttpExecutionStrategy |
requiredOffloads() |
defaultStreamingInfluencer, influenceStrategySingle<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 HttpExecutionStrategy requiredOffloads()
HttpExecutionStrategyInfluencerThe provided default implementation requests offloading of all operations. Implementations that require no
offloading should be careful to return HttpExecutionStrategies.offloadNone() rather than
HttpExecutionStrategies.offloadNever().
requiredOffloads in interface ExecutionStrategyInfluencer<HttpExecutionStrategy>requiredOffloads in interface HttpExecutionStrategyInfluencerdefault Completable closeAsync()
HttpService asynchronously.closeAsync in interface AsyncCloseableCompletable that when subscribed will close this HttpService.