Package io.servicetalk.http.api
Class HttpServiceContext
- java.lang.Object
-
- io.servicetalk.http.api.HttpServiceContext
-
- All Implemented Interfaces:
AsyncCloseable
,ListenableAsyncCloseable
,HttpConnectionContext
,ConnectionContext
,ConnectionInfo
- Direct Known Subclasses:
DelegatingHttpServiceContext
,TestHttpServiceContext
public abstract class HttpServiceContext extends java.lang.Object implements HttpConnectionContext
AHttpConnectionContext
for use in theHttpService
context.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.servicetalk.transport.api.ConnectionInfo
ConnectionInfo.Protocol
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
HttpServiceContext(HttpHeadersFactory headersFactory, HttpResponseFactory factory, StreamingHttpResponseFactory streamingFactory, BlockingStreamingHttpResponseFactory blockingFactory)
Create a new instance.protected
HttpServiceContext(HttpServiceContext other)
Copy constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected BlockingStreamingHttpResponseFactory
blockingStreamingResponseFactory()
Returns theBlockingStreamingHttpResponseFactory
associated with thisHttpServiceContext
.protected HttpHeadersFactory
headersFactory()
Returns theHttpHeadersFactory
associated with thisHttpServiceContext
.protected HttpResponseFactory
responseFactory()
Returns theHttpResponseFactory
associated with thisHttpServiceContext
.protected StreamingHttpResponseFactory
streamingResponseFactory()
Returns theStreamingHttpResponseFactory
associated with thisHttpServiceContext
.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.servicetalk.concurrent.api.AsyncCloseable
closeAsync, closeAsyncGracefully
-
Methods inherited from interface io.servicetalk.transport.api.ConnectionInfo
localAddress, remoteAddress, socketOption, sslSession
-
Methods inherited from interface io.servicetalk.http.api.HttpConnectionContext
executionContext, protocol
-
Methods inherited from interface io.servicetalk.concurrent.api.ListenableAsyncCloseable
onClose
-
-
-
-
Constructor Detail
-
HttpServiceContext
protected HttpServiceContext(HttpHeadersFactory headersFactory, HttpResponseFactory factory, StreamingHttpResponseFactory streamingFactory, BlockingStreamingHttpResponseFactory blockingFactory)
Create a new instance.- Parameters:
headersFactory
- TheHttpHeadersFactory
used for API conversionsfactory
- TheHttpResponseFactory
used for API conversionsstreamingFactory
- TheStreamingHttpResponseFactory
used for API conversionsblockingFactory
- TheBlockingStreamingHttpResponseFactory
used for API conversions
-
HttpServiceContext
protected HttpServiceContext(HttpServiceContext other)
Copy constructor.- Parameters:
other
-HttpServiceContext
to copy from.
-
-
Method Detail
-
headersFactory
protected HttpHeadersFactory headersFactory()
Returns theHttpHeadersFactory
associated with thisHttpServiceContext
.- Returns:
HttpHeadersFactory
associated with thisHttpServiceContext
.
-
responseFactory
protected HttpResponseFactory responseFactory()
Returns theHttpResponseFactory
associated with thisHttpServiceContext
.- Returns:
HttpResponseFactory
associated with thisHttpServiceContext
.
-
streamingResponseFactory
protected StreamingHttpResponseFactory streamingResponseFactory()
Returns theStreamingHttpResponseFactory
associated with thisHttpServiceContext
.- Returns:
StreamingHttpResponseFactory
associated with thisHttpServiceContext
.
-
blockingStreamingResponseFactory
protected BlockingStreamingHttpResponseFactory blockingStreamingResponseFactory()
Returns theBlockingStreamingHttpResponseFactory
associated with thisHttpServiceContext
.- Returns:
BlockingStreamingHttpResponseFactory
associated with thisHttpServiceContext
.
-
-