Package io.servicetalk.http.api
Class DelegatingHttpConnectionContext
- java.lang.Object
-
- io.servicetalk.transport.api.DelegatingConnectionContext
-
- io.servicetalk.http.api.DelegatingHttpConnectionContext
-
- All Implemented Interfaces:
AsyncCloseable
,ListenableAsyncCloseable
,HttpConnectionContext
,ConnectionContext
,ConnectionInfo
public class DelegatingHttpConnectionContext extends DelegatingConnectionContext implements HttpConnectionContext
HttpConnectionContext
implementation that delegates all calls to a providedHttpConnectionContext
. Any of the methods can be overridden by implementations to change the behavior.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.servicetalk.transport.api.ConnectionInfo
ConnectionInfo.Protocol
-
-
Constructor Summary
Constructors Constructor Description DelegatingHttpConnectionContext(HttpConnectionContext delegate)
New instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected HttpConnectionContext
delegate()
Get theHttpConnectionContext
that this class delegates to.HttpExecutionContext
executionContext()
Get theExecutionContext
for thisConnectionInfo
.HttpProtocolVersion
protocol()
Get theConnectionInfo.Protocol
for thisConnectionInfo
.-
Methods inherited from class io.servicetalk.transport.api.DelegatingConnectionContext
closeAsync, closeAsyncGracefully, localAddress, onClose, remoteAddress, socketOption, sslSession, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, 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.concurrent.api.ListenableAsyncCloseable
onClose
-
-
-
-
Constructor Detail
-
DelegatingHttpConnectionContext
public DelegatingHttpConnectionContext(HttpConnectionContext delegate)
New instance.- Parameters:
delegate
-HttpConnectionContext
to delegate all calls.
-
-
Method Detail
-
delegate
protected final HttpConnectionContext delegate()
Get theHttpConnectionContext
that this class delegates to.- Overrides:
delegate
in classDelegatingConnectionContext
- Returns:
- the
HttpConnectionContext
that this class delegates to.
-
executionContext
public HttpExecutionContext executionContext()
Description copied from interface:ConnectionInfo
Get theExecutionContext
for thisConnectionInfo
.The
ExecutionContext.ioExecutor()
will represent the thread responsible for IO for thisConnectionInfo
. Note that this maybe different that what was used to create this object because at this time a specificIoExecutor
has been selected.- Specified by:
executionContext
in interfaceConnectionInfo
- Specified by:
executionContext
in interfaceHttpConnectionContext
- Overrides:
executionContext
in classDelegatingConnectionContext
- Returns:
- the
ExecutionContext
for thisConnectionInfo
.
-
protocol
public HttpProtocolVersion protocol()
Description copied from interface:ConnectionInfo
Get theConnectionInfo.Protocol
for thisConnectionInfo
.- Specified by:
protocol
in interfaceConnectionInfo
- Specified by:
protocol
in interfaceHttpConnectionContext
- Overrides:
protocol
in classDelegatingConnectionContext
- Returns:
- the
ConnectionInfo.Protocol
for thisConnectionInfo
.
-
-