Package io.servicetalk.http.api
Class DelegatingHttpConnectionContext
java.lang.Object
io.servicetalk.concurrent.api.DelegatingAsyncCloseable<T>
io.servicetalk.concurrent.api.DelegatingListenableAsyncCloseable<ConnectionContext>
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
ConstructorsConstructorDescriptionNew instance. -
Method Summary
Modifier and TypeMethodDescriptionprotected final HttpConnectionContextdelegate()Get theHttpConnectionContextthat this class delegates to.Get theExecutionContextfor thisConnectionInfo.protocol()Get theConnectionInfo.Protocolfor thisConnectionInfo.Methods inherited from class io.servicetalk.transport.api.DelegatingConnectionContext
connectionId, localAddress, parent, remoteAddress, socketOption, sslConfig, sslSession, toStringMethods inherited from class io.servicetalk.concurrent.api.DelegatingListenableAsyncCloseable
onClose, onClosingMethods inherited from class io.servicetalk.concurrent.api.DelegatingAsyncCloseable
closeAsync, closeAsyncGracefullyMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, 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.concurrent.api.ListenableAsyncCloseable
onClose, onClosing
-
Constructor Details
-
DelegatingHttpConnectionContext
New instance.- Parameters:
delegate-HttpConnectionContextto delegate all calls.
-
-
Method Details
-
delegate
Get theHttpConnectionContextthat this class delegates to.- Overrides:
delegatein classDelegatingConnectionContext- Returns:
- the
HttpConnectionContextthat this class delegates to.
-
executionContext
Description copied from interface:ConnectionInfoGet theExecutionContextfor 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 specificIoExecutorhas been selected.- Specified by:
executionContextin interfaceConnectionInfo- Specified by:
executionContextin interfaceHttpConnectionContext- Overrides:
executionContextin classDelegatingConnectionContext- Returns:
- the
ExecutionContextfor thisConnectionInfo.
-
protocol
Description copied from interface:ConnectionInfoGet theConnectionInfo.Protocolfor thisConnectionInfo.- Specified by:
protocolin interfaceConnectionInfo- Specified by:
protocolin interfaceHttpConnectionContext- Overrides:
protocolin classDelegatingConnectionContext- Returns:
- the
ConnectionInfo.Protocolfor thisConnectionInfo.
-