|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
An interface implemented by classes responsible for creating messages adhering to a certain protocol for send data, and decoding these messages for received data. This could for example involve adding header information or creating a long message from multiple packets.
| Method Summary | |
void |
addReceivePacket(byte[] packet)
Adds a packet to the queue of received packets |
void |
addSendData(byte[] data,
boolean block)
Adds data to the queue of application data to be sent |
DataMessage |
getReceiveData()
Retrieves the next data to be passed to the application |
byte[] |
getSendPacket()
Retrieves the next packet of information to be sent via the endpoint. |
boolean |
isReceiveData()
|
boolean |
isSendPacket()
|
void |
packetError(java.io.IOException except)
Called when an exception occured sending the packed |
void |
packetSent()
Called when the packet is successfully sent, advances to the next packet in the queue. |
| Method Detail |
public void addSendData(byte[] data,
boolean block)
throws java.io.IOException
data - the application data to be send by the endpoint
java.io.IOExceptionpublic byte[] getSendPacket()
public boolean isSendPacket()
public void packetSent()
public void packetError(java.io.IOException except)
except - public void addReceivePacket(byte[] packet)
packet - the packet received by the endpointpublic DataMessage getReceiveData()
public boolean isReceiveData()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||