|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface ProtocolCodec
Interface to encode and decode commands in and out of a a non blocking channel.
| Nested Class Summary | |
|---|---|
static class |
ProtocolCodec.BufferState
|
| Method Summary | |
|---|---|
ProtocolCodec.BufferState |
flush()
Attempts to complete the previous write which did not complete. |
boolean |
full()
Is the codec's buffer full? |
long |
getLastReadSize()
|
long |
getLastWriteSize()
|
int |
getReadBufferSize()
|
long |
getReadCounter()
|
int |
getWriteBufferSize()
|
long |
getWriteCounter()
|
Object |
read()
Non-blocking channel based decoding. |
void |
setReadableByteChannel(ReadableByteChannel channel)
|
void |
setWritableByteChannel(WritableByteChannel channel)
|
void |
unread(byte[] buffer)
Pushes back a buffer as being unread. |
ProtocolCodec.BufferState |
write(Object value)
Non-blocking channel based encoding. |
| Method Detail |
|---|
void setReadableByteChannel(ReadableByteChannel channel)
throws Exception
channel -
Exception
Object read()
throws IOException
IOExceptionvoid unread(byte[] buffer)
buffer - long getReadCounter()
long getLastReadSize()
void setWritableByteChannel(WritableByteChannel channel)
throws Exception
Exceptionint getReadBufferSize()
int getWriteBufferSize()
ProtocolCodec.BufferState write(Object value)
throws IOException
IOException
ProtocolCodec.BufferState flush()
throws IOException
IOExceptionboolean full()
long getWriteCounter()
long getLastWriteSize()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||