public class DelegatingFilterableStreamingHttpLoadBalancedConnection extends Object implements FilterableStreamingHttpLoadBalancedConnection
FilterableStreamingHttpLoadBalancedConnection that delegates all methods.| Constructor and Description |
|---|
DelegatingFilterableStreamingHttpLoadBalancedConnection(FilterableStreamingHttpLoadBalancedConnection delegate)
Create a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
Completable |
closeAsync() |
Completable |
closeAsyncGracefully() |
void |
closeGracefully() |
StreamingHttpRequest |
connect(String requestTarget)
Create a new
HttpRequestMethod.CONNECT request. |
HttpConnectionContext |
connectionContext()
Get the
HttpConnectionContext. |
StreamingHttpRequest |
delete(String requestTarget)
Create a new
HttpRequestMethod.DELETE request. |
HttpExecutionContext |
executionContext()
Get the
HttpExecutionContext used during construction of this object. |
StreamingHttpRequest |
get(String requestTarget)
Create a new
HttpRequestMethod.GET request. |
StreamingHttpRequest |
head(String requestTarget)
Create a new
HttpRequestMethod.HEAD request. |
StreamingHttpResponseFactory |
httpResponseFactory()
Get a
StreamingHttpResponseFactory. |
StreamingHttpRequest |
newRequest(HttpRequestMethod method,
String requestTarget)
Create a new
HttpRequestFactory. |
Completable |
onClose() |
Completable |
onClosing() |
StreamingHttpRequest |
options(String requestTarget)
Create a new
HttpRequestMethod.OPTIONS request. |
StreamingHttpRequest |
patch(String requestTarget)
Create a new
HttpRequestMethod.PATCH request. |
StreamingHttpRequest |
post(String requestTarget)
Create a new
HttpRequestMethod.POST request. |
StreamingHttpRequest |
put(String requestTarget)
Create a new
HttpRequestMethod.PUT request. |
Completable |
releaseAsync()
Releases this reserved
FilterableStreamingHttpConnection to be used for subsequent requests. |
Single<StreamingHttpResponse> |
request(StreamingHttpRequest request)
Send a
request. |
void |
requestFinished() |
int |
score() |
String |
toString() |
StreamingHttpRequest |
trace(String requestTarget)
Create a new
HttpRequestMethod.TRACE request. |
<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. |
RequestConcurrencyController.Result |
tryRequest() |
boolean |
tryReserve() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitasBlockingConnection, asBlockingStreamingConnection, asConnectionpublic DelegatingFilterableStreamingHttpLoadBalancedConnection(FilterableStreamingHttpLoadBalancedConnection delegate)
delegate - The instance to delegate to.public RequestConcurrencyController.Result tryRequest()
tryRequest in interface LoadBalancedConnectiontryRequest in interface RequestConcurrencyControllerpublic void requestFinished()
requestFinished in interface LoadBalancedConnectionrequestFinished in interface RequestConcurrencyControllerpublic boolean tryReserve()
tryReserve in interface LoadBalancedConnectiontryReserve in interface ReservableRequestConcurrencyControllerpublic int score()
score in interface ScoreSupplierpublic Completable closeAsync()
closeAsync in interface AsyncCloseablepublic Completable closeAsyncGracefully()
closeAsyncGracefully in interface AsyncCloseablepublic Completable onClose()
onClose in interface ListenableAsyncCloseablepublic Completable onClosing()
onClosing in interface ListenableAsyncCloseablepublic 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 void close()
throws Exception
close in interface StreamingHttpConnectionclose in interface AutoCloseableExceptionpublic void closeGracefully()
throws Exception
closeGracefully in interface GracefulAutoCloseablecloseGracefully in interface StreamingHttpConnectionExceptionpublic Completable releaseAsync()
FilterableReservedStreamingHttpConnectionFilterableStreamingHttpConnection to be used for subsequent requests.
This method must be idempotent, i.e. calling multiple times must not have side-effects.releaseAsync in interface LoadBalancedConnectionreleaseAsync in interface ReservableRequestConcurrencyControllerreleaseAsync in interface FilterableReservedStreamingHttpConnectionreleaseAsync in interface FilterableStreamingHttpLoadBalancedConnectionCompletable that is notified on releaseAsync.public StreamingHttpRequest newRequest(HttpRequestMethod method, String requestTarget)
StreamingHttpRequestFactoryHttpRequestFactory.newRequest in interface StreamingHttpRequestFactorymethod - The HttpRequestMethod.requestTarget - The request target.HttpRequestFactory.public StreamingHttpRequest get(String requestTarget)
StreamingHttpRequestFactoryHttpRequestMethod.GET request.get in interface StreamingHttpRequestFactoryrequestTarget - The request target.HttpRequestMethod.GET request.public StreamingHttpRequest post(String requestTarget)
StreamingHttpRequestFactoryHttpRequestMethod.POST request.post in interface StreamingHttpRequestFactoryrequestTarget - The request target.HttpRequestMethod.POST request.public StreamingHttpRequest put(String requestTarget)
StreamingHttpRequestFactoryHttpRequestMethod.PUT request.put in interface StreamingHttpRequestFactoryrequestTarget - The request target.HttpRequestMethod.PUT request.public StreamingHttpRequest options(String requestTarget)
StreamingHttpRequestFactoryHttpRequestMethod.OPTIONS request.options in interface StreamingHttpRequestFactoryrequestTarget - The request target.HttpRequestMethod.OPTIONS request.public StreamingHttpRequest head(String requestTarget)
StreamingHttpRequestFactoryHttpRequestMethod.HEAD request.head in interface StreamingHttpRequestFactoryrequestTarget - The request target.HttpRequestMethod.HEAD request.public StreamingHttpRequest trace(String requestTarget)
StreamingHttpRequestFactoryHttpRequestMethod.TRACE request.trace in interface StreamingHttpRequestFactoryrequestTarget - The request target.HttpRequestMethod.TRACE request.public StreamingHttpRequest delete(String requestTarget)
StreamingHttpRequestFactoryHttpRequestMethod.DELETE request.delete in interface StreamingHttpRequestFactoryrequestTarget - The request target.HttpRequestMethod.DELETE request.public StreamingHttpRequest patch(String requestTarget)
StreamingHttpRequestFactoryHttpRequestMethod.PATCH request.patch in interface StreamingHttpRequestFactoryrequestTarget - The request target.HttpRequestMethod.PATCH request.public StreamingHttpRequest connect(String requestTarget)
StreamingHttpRequestFactoryHttpRequestMethod.CONNECT request.connect in interface StreamingHttpRequestFactoryrequestTarget - The request target.HttpRequestMethod.CONNECT request.public Single<StreamingHttpResponse> request(StreamingHttpRequest request)
StreamingHttpRequesterrequest.request in interface StreamingHttpRequesterrequest - the request to send.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 String toString()
toString in class Object