|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
This interface defines the contract for a protocol implementation. An instance of this interface is created for each socket connection.
| Field Summary | |
static int |
BY_APPLICATION
Disconnect reason: The application disconnected |
| Method Summary | |
void |
disconnect(int reason,
java.lang.String description)
Disconnect the Engine |
SocketConnection |
getSocketConnection()
Get the SocketConnection for this connection. |
boolean |
isConnected()
Is the protocol connected. |
void |
onSocketClose()
The socket has closed. |
void |
onSocketConnect(SocketConnection connection)
The socket is connected and the protocol can now start. |
boolean |
onSocketRead(java.nio.ByteBuffer applicationData)
Data has arrived on the socket. |
SocketWriteCallback |
onSocketWrite(java.nio.ByteBuffer applicationData)
The socket is ready for writing. |
boolean |
wantsToWrite()
Determines whether the protocol wants to write to the socket. |
| Field Detail |
public static final int BY_APPLICATION
| Method Detail |
public void onSocketConnect(SocketConnection connection)
connection - SocketConnectionpublic void onSocketClose()
public boolean onSocketRead(java.nio.ByteBuffer applicationData)
applicationData - ByteBuffer
public SocketWriteCallback onSocketWrite(java.nio.ByteBuffer applicationData)
applicationData - ByteBufferpublic boolean wantsToWrite()
public boolean isConnected()
public SocketConnection getSocketConnection()
SocketConnection for this connection.
public void disconnect(int reason,
java.lang.String description)
reason - description -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||