|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface ByteIOFramer
Interface supporting message framing services.
A ByteIOFramer is responsible for actually extracting messages from the bytes arriving over a connection and doing something meaningful with them. It is also responsible for actually producing the bytes to be transmitted when a message is sent over a connection
| Method Summary | |
|---|---|
byte[] |
produceBytes(Object message)
Produce the bytes for writing a message to a connection. |
void |
receiveBytes(byte[] data,
int length)
Process bytes of data received. |
| Method Detail |
|---|
void receiveBytes(byte[] data,
int length)
throws IOException
data - The bytes received. The caller is not obligated to
maintain the contents of this array after this method returns.length - Number of usable bytes in 'data' (which may be different
from the length of the 'data' array itself). The end of input is
indicated by a 'length' value of 0.
IOException
byte[] produceBytes(Object message)
throws IOException
Although the message is declared to be of class Object, particular implementors of this interface may accept a more limited set of classes as valid message types. It is up to the particular implementor to document which types it actually accepts. It is up to the user of a particular implementation to limit its message transmissions to the prescribed set of types.
message - The message to be written.
IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||