-
- All Superinterfaces:
ConnectionContext
,FlowContext
,SocketRef
public interface SocketContext extends SocketRef, FlowContext
Network socket context that manages asynchronous I/O operations for a non-blocking NIO network channel. ASocketContext
is implicitly bound to aSocket
, providing theSocket
with the ability to modify itsFlowControl
state, access its read and write buffers, tobecome
a different kind ofSocket
, and to close the socket.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
become(Socket socket)
Rebinds thisSocketContext
to a newsocket
implementation, thereby changing theSocket
handler that receives network I/O callbacks.InputBuffer
inputBuffer()
Returns the buffer into which input data is read by the underlying network socket.OutputBuffer<?>
outputBuffer()
Returns the buffer from which output data is written by the underlying network socket.SocketSettings
socketSettings()
Returns the configuration parameters that govern the underlying network socket.-
Methods inherited from interface swim.io.ConnectionContext
cipherSuite, isClient, isConnected, isSecure, isServer, localAddress, localCertificates, localPrincipal, remoteAddress, remoteCertificates, remotePrincipal, securityProtocol
-
Methods inherited from interface swim.io.FlowContext
flowControl, flowControl, flowControl
-
-
-
-
Method Detail
-
socketSettings
SocketSettings socketSettings()
Returns the configuration parameters that govern the underlying network socket.
-
inputBuffer
InputBuffer inputBuffer()
Returns the buffer into which input data is read by the underlying network socket. The boundSocket
reads from this buffer in response todoRead
callbacks.
-
outputBuffer
OutputBuffer<?> outputBuffer()
Returns the buffer from which output data is written by the underlying network socket. The boundSocket
writes to this buffer in repsonse todoWrite
callbacks.
-
become
void become(Socket socket)
Rebinds thisSocketContext
to a newsocket
implementation, thereby changing theSocket
handler that receives network I/O callbacks.
-
-