Package io.servicetalk.http.api
Class HttpServiceContext
java.lang.Object
io.servicetalk.http.api.HttpServiceContext
- All Implemented Interfaces:
AsyncCloseable,ListenableAsyncCloseable,HttpConnectionContext,ConnectionContext,ConnectionInfo,ServerListenContext
- Direct Known Subclasses:
DelegatingHttpServiceContext
public abstract class HttpServiceContext
extends Object
implements HttpConnectionContext, ServerListenContext
A
HttpConnectionContext for use in the HttpService context.-
Nested Class Summary
Nested classes/interfaces inherited from interface io.servicetalk.transport.api.ConnectionInfo
ConnectionInfo.Protocol -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedHttpServiceContext(HttpHeadersFactory headersFactory, HttpResponseFactory factory, StreamingHttpResponseFactory streamingFactory, BlockingStreamingHttpResponseFactory blockingFactory) Create a new instance.protectedCopy constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected BlockingStreamingHttpResponseFactoryReturns theBlockingStreamingHttpResponseFactoryassociated with thisHttpServiceContext.protected HttpHeadersFactoryReturns theHttpHeadersFactoryassociated with thisHttpServiceContext.protected HttpResponseFactoryReturns theHttpResponseFactoryassociated with thisHttpServiceContext.protected StreamingHttpResponseFactoryReturns theStreamingHttpResponseFactoryassociated with thisHttpServiceContext.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.servicetalk.concurrent.api.AsyncCloseable
closeAsync, closeAsyncGracefullyMethods inherited from interface io.servicetalk.transport.api.ConnectionContext
parentMethods inherited from interface io.servicetalk.transport.api.ConnectionInfo
connectionId, localAddress, remoteAddress, socketOption, sslConfig, sslSession, toStringMethods inherited from interface io.servicetalk.http.api.HttpConnectionContext
executionContext, protocolMethods inherited from interface io.servicetalk.concurrent.api.ListenableAsyncCloseable
onClose, onClosingMethods inherited from interface io.servicetalk.transport.api.ServerListenContext
acceptConnections
-
Constructor Details
-
HttpServiceContext
protected HttpServiceContext(HttpHeadersFactory headersFactory, HttpResponseFactory factory, StreamingHttpResponseFactory streamingFactory, BlockingStreamingHttpResponseFactory blockingFactory) Create a new instance.- Parameters:
headersFactory- TheHttpHeadersFactoryused for API conversionsfactory- TheHttpResponseFactoryused for API conversionsstreamingFactory- TheStreamingHttpResponseFactoryused for API conversionsblockingFactory- TheBlockingStreamingHttpResponseFactoryused for API conversions
-
HttpServiceContext
Copy constructor.- Parameters:
other-HttpServiceContextto copy from.
-
-
Method Details
-
headersFactory
Returns theHttpHeadersFactoryassociated with thisHttpServiceContext.- Returns:
HttpHeadersFactoryassociated with thisHttpServiceContext.
-
responseFactory
Returns theHttpResponseFactoryassociated with thisHttpServiceContext.- Returns:
HttpResponseFactoryassociated with thisHttpServiceContext.
-
streamingResponseFactory
Returns theStreamingHttpResponseFactoryassociated with thisHttpServiceContext.- Returns:
StreamingHttpResponseFactoryassociated with thisHttpServiceContext.
-
blockingStreamingResponseFactory
Returns theBlockingStreamingHttpResponseFactoryassociated with thisHttpServiceContext.- Returns:
BlockingStreamingHttpResponseFactoryassociated with thisHttpServiceContext.
-