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 provided HttpConnectionContext
.
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
ConstructorDescriptionNew instance. -
Method Summary
Modifier and TypeMethodDescriptionprotected final HttpConnectionContext
delegate()
Get theHttpConnectionContext
that this class delegates to.Get theExecutionContext
for thisConnectionInfo
.protocol()
Get theConnectionInfo.Protocol
for thisConnectionInfo
.Methods inherited from class io.servicetalk.transport.api.DelegatingConnectionContext
closeAsync, closeAsyncGracefully, localAddress, onClose, onClosing, parent, remoteAddress, socketOption, sslConfig, 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.ConnectionContext
parent
Methods inherited from interface io.servicetalk.transport.api.ConnectionInfo
localAddress, remoteAddress, socketOption, sslConfig, sslSession
Methods inherited from interface io.servicetalk.concurrent.api.ListenableAsyncCloseable
onClose, onClosing
-
Constructor Details
-
DelegatingHttpConnectionContext
New instance.- Parameters:
delegate
-HttpConnectionContext
to delegate all calls.
-
-
Method Details
-
delegate
Get theHttpConnectionContext
that this class delegates to.- Overrides:
delegate
in classDelegatingConnectionContext
- Returns:
- the
HttpConnectionContext
that this class delegates to.
-
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
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
.
-