Package com.iizix.nio
Interface SocketCommListener
public interface SocketCommListenerThe socket communication listener.- Author:
- Christopher Mindus
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidonCommClosed(SocketCommNIO comm)Called when the communication link is closed.voidonCommConnected(SocketCommNIO comm)Called when the communication link is connected.voidonCommData(SocketCommNIO comm, java.nio.ByteBuffer buf)Called when the communication link has received data.voidonCommError(SocketCommNIO comm, java.io.IOException e)Called when the communication link is closed.voidonCommOpen(SocketCommNIO comm)Called when the communication link is opened.voidonCommState(SocketCommNIO comm)Called when the state changes.voidonCommTimeout(SocketCommNIO comm, boolean isReadTimeout)Called when the communication link has timed out on a read or write operation.
Method Detail
onCommOpen
void onCommOpen(SocketCommNIO comm)
Called when the communication link is opened.- Parameters:
comm- The socket communication instance.
onCommState
void onCommState(SocketCommNIO comm)
Called when the state changes.
onCommConnected
void onCommConnected(SocketCommNIO comm)
Called when the communication link is connected.- Parameters:
comm- The socket communication instance.
onCommData
void onCommData(SocketCommNIO comm, java.nio.ByteBuffer buf)
Called when the communication link has received data.- Parameters:
comm- The socket communication instance.buf- The data byte array.
onCommTimeout
void onCommTimeout(SocketCommNIO comm, boolean isReadTimeout)
Called 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.
onCommError
void onCommError(SocketCommNIO comm, java.io.IOException e)
Called when the communication link is closed.- Parameters:
comm- The socket communication instance.e- The exception.
onCommClosed
void onCommClosed(SocketCommNIO comm)
Called when the communication link is closed.- Parameters:
comm- The socket communication instance.