Package com.iizix.nio
Interface SocketCommListener
public interface SocketCommListener
The socket communication listener.
- Author:
- Christopher Mindus
- Method SummaryModifier and TypeMethodDescription- void- onCommClosed- (SocketCommNIO comm) Called when the communication link is closed.- void- onCommConnected- (SocketCommNIO comm) Called when the communication link is connected.- void- onCommData- (SocketCommNIO comm, ByteBuffer buf) Called when the communication link has received data.- void- onCommError- (SocketCommNIO comm, IOException e) Called when the communication link is closed.- void- onCommOpen- (SocketCommNIO comm) Called when the communication link is opened.- void- onCommState- (SocketCommNIO comm) Called when the state changes.- void- onCommTimeout- (SocketCommNIO comm, boolean isReadTimeout) Called when the communication link has timed out on a read or write operation.
- Method Details- onCommOpenCalled when the communication link is opened.- Parameters:
- comm- The socket communication instance.
 
- onCommStateCalled when the state changes.
- onCommConnectedCalled when the communication link is connected.- Parameters:
- comm- The socket communication instance.
 
- onCommDataCalled when the communication link has received data.- Parameters:
- comm- The socket communication instance.
- buf- The data byte array.
 
- onCommTimeoutCalled when the communication link has timed out on a read or write operation.- Parameters:
- comm- The socket communication instance.
- isReadTimeout- Flag indicating read timeout when true, false indicates write timeout.
 
- onCommErrorCalled when the communication link is closed.- Parameters:
- comm- The socket communication instance.
- e- The exception.
 
- onCommClosedCalled when the communication link is closed.- Parameters:
- comm- The socket communication instance.