public class LengthPrefixedCodec extends java.lang.Object implements ProtocolCodec
ProtocolCodec.BufferState| Constructor and Description |
|---|
LengthPrefixedCodec() |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
empty() |
ProtocolCodec.BufferState |
flush()
Attempts to complete the previous write which did not complete.
|
boolean |
full() |
long |
getReadCounter() |
long |
getWriteCounter() |
java.lang.Object |
read()
Non-blocking channel based decoding.
|
void |
setReadableByteChannel(java.nio.channels.ReadableByteChannel channel) |
void |
setWritableByteChannel(java.nio.channels.WritableByteChannel channel) |
ProtocolCodec.BufferState |
write(java.lang.Object value)
Non-blocking channel based encoding.
|
public boolean full()
full in interface ProtocolCodecprotected boolean empty()
public void setWritableByteChannel(java.nio.channels.WritableByteChannel channel)
setWritableByteChannel in interface ProtocolCodecpublic ProtocolCodec.BufferState write(java.lang.Object value) throws java.io.IOException
ProtocolCodecwrite in interface ProtocolCodecjava.io.IOExceptionpublic ProtocolCodec.BufferState flush() throws java.io.IOException
ProtocolCodecflush in interface ProtocolCodecjava.io.IOExceptionpublic long getWriteCounter()
getWriteCounter in interface ProtocolCodecpublic void setReadableByteChannel(java.nio.channels.ReadableByteChannel channel)
setReadableByteChannel in interface ProtocolCodecpublic java.lang.Object read()
throws java.io.IOException
ProtocolCodecread in interface ProtocolCodecjava.io.IOExceptionpublic long getReadCounter()
getReadCounter in interface ProtocolCodecCopyright © 2014 Red Hat. All Rights Reserved.