|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.littleshoot.mina.filter.codec.support.SimpleProtocolEncoderOutput
public abstract class SimpleProtocolEncoderOutput
A ProtocolEncoderOutput based on queue.
| Constructor Summary | |
|---|---|
SimpleProtocolEncoderOutput()
|
|
| Method Summary | |
|---|---|
protected abstract WriteFuture |
doFlush(ByteBuffer buf)
|
WriteFuture |
flush()
Flushes all buffers you wrote via ProtocolEncoderOutput.write(ByteBuffer) to
the session. |
Queue<ByteBuffer> |
getBufferQueue()
|
void |
mergeAll()
Merges all buffers you wrote via ProtocolEncoderOutput.write(ByteBuffer) into
one ByteBuffer and replaces the old fragmented ones with it. |
void |
write(ByteBuffer buf)
Callback for ProtocolEncoder to generate encoded
ByteBuffers. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SimpleProtocolEncoderOutput()
| Method Detail |
|---|
public Queue<ByteBuffer> getBufferQueue()
public void write(ByteBuffer buf)
ProtocolEncoderOutputProtocolEncoder to generate encoded
ByteBuffers. ProtocolEncoder must call
ProtocolEncoderOutput.write(ByteBuffer) for each encoded message.
write in interface ProtocolEncoderOutputbuf - the buffer which contains encoded datapublic void mergeAll()
ProtocolEncoderOutputProtocolEncoderOutput.write(ByteBuffer) into
one ByteBuffer and replaces the old fragmented ones with it.
This method is useful when you want to control the way MINA generates
network packets.
mergeAll in interface ProtocolEncoderOutputpublic WriteFuture flush()
ProtocolEncoderOutputProtocolEncoderOutput.write(ByteBuffer) to
the session. This operation is asynchronous; please wait for
the returned WriteFuture if you want to wait for
the buffers flushed.
flush in interface ProtocolEncoderOutputprotected abstract WriteFuture doFlush(ByteBuffer buf)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||