public class StreamingHttpServiceFilter extends Object implements StreamingHttpService
StreamingHttpService that delegates all methods to the provided
StreamingHttpService.| Constructor and Description |
|---|
StreamingHttpServiceFilter(StreamingHttpService delegate)
New instance.
|
| Modifier and Type | Method and Description |
|---|---|
Completable |
closeAsync()
Closes this
StreamingHttpService asynchronously. |
Completable |
closeAsyncGracefully() |
protected StreamingHttpService |
delegate()
Returns
StreamingHttpService to which all calls are delegated. |
Single<StreamingHttpResponse> |
handle(HttpServiceContext ctx,
StreamingHttpRequest request,
StreamingHttpResponseFactory responseFactory)
Handles a single HTTP request.
|
public StreamingHttpServiceFilter(StreamingHttpService delegate)
delegate - StreamingHttpService to delegate all calls.public Single<StreamingHttpResponse> handle(HttpServiceContext ctx, StreamingHttpRequest request, StreamingHttpResponseFactory responseFactory)
StreamingHttpServicehandle in interface StreamingHttpServicectx - Context of the service.request - to handle.responseFactory - used to create StreamingHttpResponse objects.Single of HTTP response.public Completable closeAsync()
StreamingHttpServiceStreamingHttpService asynchronously.closeAsync in interface AsyncCloseablecloseAsync in interface StreamingHttpServiceCompletable that when subscribed will close this StreamingHttpService.public Completable closeAsyncGracefully()
closeAsyncGracefully in interface AsyncCloseableprotected final StreamingHttpService delegate()
StreamingHttpService to which all calls are delegated.StreamingHttpService to which all calls are delegated.