java.lang.Object
swim.io.AbstractIpSocket
- All Implemented Interfaces:
FlowContext,IpContext,IpSocket
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidReturns the cryptographic cipher suite used by the underlying network connection.voidclose()voidLifecycle callback invoked by the socket context after it hasbecomea newsocketimplementation.voidLifecycle callback invoked by the socket context after the underlying network socket has opened a connection.voidLifecycle callback invoked by the socket context after the underlying network connection has disconnected.voidLifecycle callback invoked by the socket context when the underlying network socket fails by throwing anerror.voidLifecycle callback invoked by the socket context after the underlying network socket has established a secure connection.voidLifecycle callback invoked by the socket context after the underlying network connection has timed out.voiddidWrite()I/O callback invoked by the socket context after the underlying network socket has completed writing all data in itsoutputBuffer.voiddoRead()I/O callback invoked by the socket context asking thisIpSocketto read input data out of the socket context'sinputBuffer.voiddoWrite()I/O callback invoked by the socket context asking thisIpSocketto write output data into the socket context'soutputBuffer.Returns the currentFlowControlstate of the underlying network channel.voidflowControl(FlowControl flowControl) Enqueues an atomic replacement of the underlying network channel's flow control state with a newflowControl.flowControl(FlowModifier flowModifier) Enqueues an atomic modification to the underlying network channel's flow control state by applying aflowModifierdelta.longReturns the number of idle milliseconds after which thisIpSocketshould be closed due to inactivity.Returns the network socket context to which thisIpSocketis bound; returnsnullif thisIpSocketis unbound.booleanisClient()Returnstrueif the underlying network channel initiated an outgoing connection.booleanReturnstrueif the underlying network channel is currently connected.booleanisSecure()Returnstrueif the underlying network transport is encrypted.booleanisServer()Returnstrueif the underlying network channel accepted an incoming connection.Returns the IP address and port of the local endpoint of the underlying network connection.Returns the certificate chain used to authenticate the local endpoint of the underlying network connection.Returns the authenticated identity of the local endpoint of the underlying network connection.OutputBuffer<?>Returns the IP address and port of the remote endpoint of the underlying network connection.Returns the certificate chain used to authenticate the remote endpoint of the underlying network connection.Returns the authenticated identity of the remote endpoint of the underlying network connection.Returns the name of the transport-layer security protocol used by the underlying network connection.voidsetIpSocketContext(IpSocketContext context) Sets the network socket context to which thisIpSocketis bound.voidwillBecome(IpSocket socket) Lifecycle callback invoked by the socket context before it hasbecomea newsocketimplementation.voidLifecycle callback invoked by the socket context before the underlying network socket attempts to open a connection.voidLifecycle callback invoked by the socket context before the underlying network socket establishes a secure connection.
-
Field Details
-
context
-
-
Constructor Details
-
AbstractIpSocket
public AbstractIpSocket()
-
-
Method Details
-
ipSocketContext
Description copied from interface:IpSocketReturns the network socket context to which thisIpSocketis bound; returnsnullif thisIpSocketis unbound.- Specified by:
ipSocketContextin interfaceIpSocket
-
setIpSocketContext
Description copied from interface:IpSocketSets the network socket context to which thisIpSocketis bound.- Specified by:
setIpSocketContextin interfaceIpSocket
-
idleTimeout
public long idleTimeout()Description copied from interface:IpSocketReturns the number of idle milliseconds after which thisIpSocketshould be closed due to inactivity. Returns-1if a default idle timeout should be used. Returns0if the underlying network socket should not time out.- Specified by:
idleTimeoutin interfaceIpSocket
-
doRead
public void doRead()Description copied from interface:IpSocketI/O callback invoked by the socket context asking thisIpSocketto read input data out of the socket context'sinputBuffer. May be invoked concurrently to other I/O callbacks, but never concurrently with otherdoReadcalls. -
doWrite
public void doWrite()Description copied from interface:IpSocketI/O callback invoked by the socket context asking thisIpSocketto write output data into the socket context'soutputBuffer. May be invoked concurrently to other I/O callbacks, but never concurrently with otherdoWriteordidWritecalls. -
didWrite
public void didWrite()Description copied from interface:IpSocketI/O callback invoked by the socket context after the underlying network socket has completed writing all data in itsoutputBuffer. May be invoked concurrently to other I/O callbacks, but never concurrently with otherdoWriteordidWritecalls. -
willConnect
public void willConnect()Description copied from interface:IpSocketLifecycle callback invoked by the socket context before the underlying network socket attempts to open a connection.- Specified by:
willConnectin interfaceIpSocket
-
didConnect
public void didConnect()Description copied from interface:IpSocketLifecycle callback invoked by the socket context after the underlying network socket has opened a connection.- Specified by:
didConnectin interfaceIpSocket
-
willSecure
public void willSecure()Description copied from interface:IpSocketLifecycle callback invoked by the socket context before the underlying network socket establishes a secure connection.- Specified by:
willSecurein interfaceIpSocket
-
didSecure
public void didSecure()Description copied from interface:IpSocketLifecycle callback invoked by the socket context after the underlying network socket has established a secure connection. -
willBecome
Description copied from interface:IpSocketLifecycle callback invoked by the socket context before it hasbecomea newsocketimplementation.- Specified by:
willBecomein interfaceIpSocket
-
didBecome
Description copied from interface:IpSocketLifecycle callback invoked by the socket context after it hasbecomea newsocketimplementation. -
didTimeout
public void didTimeout()Description copied from interface:IpSocketLifecycle callback invoked by the socket context after the underlying network connection has timed out. The socket will automatically be closed.- Specified by:
didTimeoutin interfaceIpSocket
-
didDisconnect
public void didDisconnect()Description copied from interface:IpSocketLifecycle callback invoked by the socket context after the underlying network connection has disconnected.- Specified by:
didDisconnectin interfaceIpSocket
-
didFail
Description copied from interface:IpSocketLifecycle callback invoked by the socket context when the underlying network socket fails by throwing anerror. The socket will automatically be closed. -
isConnected
public boolean isConnected()Description copied from interface:IpContextReturnstrueif the underlying network channel is currently connected.- Specified by:
isConnectedin interfaceIpContext
-
isClient
public boolean isClient()Description copied from interface:IpContextReturnstrueif the underlying network channel initiated an outgoing connection. -
isServer
public boolean isServer()Description copied from interface:IpContextReturnstrueif the underlying network channel accepted an incoming connection. -
isSecure
public boolean isSecure()Description copied from interface:IpContextReturnstrueif the underlying network transport is encrypted. -
securityProtocol
Description copied from interface:IpContextReturns the name of the transport-layer security protocol used by the underlying network connection. Returnsnullif the underlying network channel is not currently connected, or if the underlying network connection is not secure.- Specified by:
securityProtocolin interfaceIpContext
-
cipherSuite
Description copied from interface:IpContextReturns the cryptographic cipher suite used by the underlying network connection. Returnsnullif the underlying network channel is not currently connected, or if the underlying network connection is not secure.- Specified by:
cipherSuitein interfaceIpContext
-
localAddress
Description copied from interface:IpContextReturns the IP address and port of the local endpoint of the underlying network connection. Returnsnullif the underlying network channel is not currently connected.- Specified by:
localAddressin interfaceIpContext
-
localPrincipal
Description copied from interface:IpContextReturns the authenticated identity of the local endpoint of the underlying network connection. Returnsnullif the underlying network channel is not currently connected, or if the underlying network connection is not authenticated.- Specified by:
localPrincipalin interfaceIpContext
-
localCertificates
Description copied from interface:IpContextReturns the certificate chain used to authenticate the local endpoint of the underlying network connection. Returnsnullif the underlying network channel is not currently connected, or if the underlying network connection is not authenticated.- Specified by:
localCertificatesin interfaceIpContext
-
remoteAddress
Description copied from interface:IpContextReturns the IP address and port of the remote endpoint of the underlying network connection. Returnsnullif the underlying network channel is not currently connected.- Specified by:
remoteAddressin interfaceIpContext
-
remotePrincipal
Description copied from interface:IpContextReturns the authenticated identity of the remote endpoint of the underlying network connection. Returnsnullif the underlying network channel is not currently connected, or if the underlying network connection is not authenticated.- Specified by:
remotePrincipalin interfaceIpContext
-
remoteCertificates
Description copied from interface:IpContextReturns the certificate chain used to authenticate the remote endpoint of the underlying network connection. Returnsnullif the underlying network channel is not currently connected, or if the underlying network connection is not authenticated.- Specified by:
remoteCertificatesin interfaceIpContext
-
flowControl
Description copied from interface:FlowContextReturns the currentFlowControlstate of the underlying network channel.- Specified by:
flowControlin interfaceFlowContext
-
flowControl
Description copied from interface:FlowContextEnqueues an atomic replacement of the underlying network channel's flow control state with a newflowControl.- Specified by:
flowControlin interfaceFlowContext
-
flowControl
Description copied from interface:FlowContextEnqueues an atomic modification to the underlying network channel's flow control state by applying aflowModifierdelta.- Specified by:
flowControlin interfaceFlowContext
-
ipSettings
-
inputBuffer
-
outputBuffer
-
become
-
close
public void close()
-