public class TestHttpServiceContext extends HttpServiceContext
HttpConnectionContext.HttpProtocol
ConnectionInfo.Protocol
Constructor and Description |
---|
TestHttpServiceContext(HttpHeadersFactory headersFactory,
StreamingHttpRequestResponseFactory reqRespFactory,
HttpExecutionContext executionContext) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
closeAsyncGracefully
public TestHttpServiceContext(HttpHeadersFactory headersFactory, StreamingHttpRequestResponseFactory reqRespFactory, HttpExecutionContext executionContext)
public HttpHeadersFactory headersFactory()
HttpServiceContext
HttpHeadersFactory
associated with this HttpServiceContext
.headersFactory
in class HttpServiceContext
HttpHeadersFactory
associated with this HttpServiceContext
.public HttpResponseFactory responseFactory()
HttpServiceContext
HttpResponseFactory
associated with this HttpServiceContext
.responseFactory
in class HttpServiceContext
HttpResponseFactory
associated with this HttpServiceContext
.public StreamingHttpResponseFactory streamingResponseFactory()
HttpServiceContext
StreamingHttpResponseFactory
associated with this HttpServiceContext
.streamingResponseFactory
in class HttpServiceContext
StreamingHttpResponseFactory
associated with this HttpServiceContext
.public BlockingStreamingHttpResponseFactory blockingStreamingResponseFactory()
HttpServiceContext
BlockingStreamingHttpResponseFactory
associated with this HttpServiceContext
.blockingStreamingResponseFactory
in class HttpServiceContext
BlockingStreamingHttpResponseFactory
associated with this HttpServiceContext
.public java.net.SocketAddress localAddress()
ConnectionInfo
SocketAddress
to which the associated connection is bound.SocketAddress
to which the associated connection is bound.public java.net.SocketAddress remoteAddress()
ConnectionInfo
SocketAddress
to which the associated connection is connected.SocketAddress
to which the associated connection is connected.@Nullable public javax.net.ssl.SSLSession sslSession()
ConnectionInfo
SSLSession
for this connection.SSLSession
if SSL/TLS is enabled, or null
otherwise.public HttpExecutionContext executionContext()
ConnectionInfo
ExecutionContext
for this ConnectionInfo
.
The ExecutionContext.ioExecutor()
will represent the thread responsible for IO for this
ConnectionInfo
. Note that this maybe different that what was used to create this object because
at this time a specific IoExecutor
has been selected.
ExecutionContext
for this ConnectionInfo
.@Nullable public <T> T socketOption(java.net.SocketOption<T> option)
ConnectionInfo
T
- the type of the SocketOption
value.option
- SocketOption
to get.SocketOption
value of type T
for this ConnectionInfo
or null
if
this SocketOption
is not supported by this ConnectionInfo
.StandardSocketOptions
,
ServiceTalkSocketOptions
public HttpConnectionContext.HttpProtocol protocol()
ConnectionInfo
ConnectionInfo.Protocol
for this ConnectionInfo
.ConnectionInfo.Protocol
for this ConnectionInfo
.public Completable onClose()
ListenableAsyncCloseable
Completable
that is notified once the ListenableAsyncCloseable
was closed.Completable
that is notified on close.public Completable closeAsync()
AsyncCloseable
Completable
that is notified once the close is complete.