public class StreamingHttpConnectionFilter extends Object implements FilterableStreamingHttpConnection
StreamingHttpConnection that delegates all methods to a different StreamingHttpConnection.StreamingHttpConnectionFilterFactory| Modifier | Constructor and Description |
|---|---|
protected |
StreamingHttpConnectionFilter(FilterableStreamingHttpConnection delegate)
Create a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
Completable |
closeAsync() |
Completable |
closeAsyncGracefully() |
HttpConnectionContext |
connectionContext()
Get the
HttpConnectionContext. |
protected FilterableStreamingHttpConnection |
delegate()
Get the
FilterableStreamingHttpConnection this method delegates to. |
HttpExecutionContext |
executionContext()
Get the
HttpExecutionContext used during construction of this object. |
StreamingHttpResponseFactory |
httpResponseFactory()
Get a
StreamingHttpResponseFactory. |
StreamingHttpRequest |
newRequest(HttpRequestMethod method,
String requestTarget)
Create a new
HttpRequestFactory. |
Completable |
onClose() |
Completable |
onClosing() |
Single<StreamingHttpResponse> |
request(StreamingHttpRequest request)
Send a
request. |
String |
toString() |
<T> Publisher<? extends T> |
transportEventStream(HttpEventKey<T> eventKey)
Returns a
Publisher that gives the current value of a transport event as well as subsequent changes to
the event value as long as the PublisherSource.Subscriber has expressed enough demand. |
protected StreamingHttpConnectionFilter(FilterableStreamingHttpConnection delegate)
delegate - The FilterableStreamingHttpConnection to delegate all calls to.public Single<StreamingHttpResponse> request(StreamingHttpRequest request)
StreamingHttpRequesterrequest.request in interface StreamingHttpRequesterrequest - the request to send.public HttpConnectionContext connectionContext()
FilterableStreamingHttpConnectionHttpConnectionContext.connectionContext in interface FilterableStreamingHttpConnectionHttpConnectionContext.public <T> Publisher<? extends T> transportEventStream(HttpEventKey<T> eventKey)
FilterableStreamingHttpConnectionPublisher that gives the current value of a transport event as well as subsequent changes to
the event value as long as the PublisherSource.Subscriber has expressed enough demand.
This is designed for events produced by the transport, and consumed by filters interested in transport behavior which is not directly involved in the data path.
transportEventStream in interface FilterableStreamingHttpConnectionT - Type of the event value.eventKey - Name of the event to fetch.Publisher for the event values.public HttpExecutionContext executionContext()
StreamingHttpRequesterHttpExecutionContext used during construction of this object.
Note that the ExecutionContext.ioExecutor() will not necessarily be associated with a specific thread
unless that was how this object was built.
executionContext in interface StreamingHttpRequesterHttpExecutionContext used during construction of this object.public StreamingHttpResponseFactory httpResponseFactory()
StreamingHttpRequesterStreamingHttpResponseFactory.httpResponseFactory in interface StreamingHttpRequesterStreamingHttpResponseFactory.public Completable onClose()
onClose in interface ListenableAsyncCloseablepublic Completable onClosing()
onClosing in interface ListenableAsyncCloseablepublic Completable closeAsync()
closeAsync in interface AsyncCloseablepublic Completable closeAsyncGracefully()
closeAsyncGracefully in interface AsyncCloseablepublic final StreamingHttpRequest newRequest(HttpRequestMethod method, String requestTarget)
StreamingHttpRequestFactoryHttpRequestFactory.newRequest in interface StreamingHttpRequestFactorymethod - The HttpRequestMethod.requestTarget - The request target.HttpRequestFactory.public String toString()
toString in class Objectprotected FilterableStreamingHttpConnection delegate()
FilterableStreamingHttpConnection this method delegates to.FilterableStreamingHttpConnection this method delegates to.