public interface ConnectionContext extends ListenableAsyncCloseable
| Modifier and Type | Interface and Description |
|---|---|
static interface |
ConnectionContext.Protocol
Provides information about the network protocol.
|
| Modifier and Type | Method and Description |
|---|---|
ExecutionContext |
executionContext()
Get the
ExecutionContext for this ConnectionContext. |
java.net.SocketAddress |
localAddress()
The
SocketAddress to which the associated connection is bound. |
ConnectionContext.Protocol |
protocol()
Get the
ConnectionContext.Protocol for this ConnectionContext. |
java.net.SocketAddress |
remoteAddress()
The
SocketAddress to which the associated connection is connected. |
<T> T |
socketOption(java.net.SocketOption<T> option)
|
javax.net.ssl.SSLSession |
sslSession()
Get the
SSLSession for this connection. |
onClosecloseAsync, closeAsyncGracefullyjava.net.SocketAddress localAddress()
SocketAddress to which the associated connection is bound.SocketAddress to which the associated connection is bound.java.net.SocketAddress remoteAddress()
SocketAddress to which the associated connection is connected.SocketAddress to which the associated connection is connected.@Nullable javax.net.ssl.SSLSession sslSession()
SSLSession for this connection.SSLSession if SSL/TLS is enabled, or null otherwise.ExecutionContext executionContext()
ExecutionContext for this ConnectionContext.
The ExecutionContext.ioExecutor() will represent the thread responsible for IO for this
ConnectionContext. Note that this maybe different that what was used to create this object because
at this time a specific IoExecutor has been selected.
ExecutionContext for this ConnectionContext.@Nullable <T> T socketOption(java.net.SocketOption<T> option)
T - the type of the SocketOption value.option - SocketOption to get.SocketOption value of type T for this ConnectionContext or null if
this SocketOption is not supported by this ConnectionContext.StandardSocketOptions,
ServiceTalkSocketOptionsConnectionContext.Protocol protocol()
ConnectionContext.Protocol for this ConnectionContext.ConnectionContext.Protocol for this ConnectionContext.