public interface ProtocolEncoderOutput
ProtocolEncoder
to generate encoded ByteBuffer
s.
ProtocolEncoder
must call write(ByteBuffer)
for each encoded
message.Modifier and Type | Method and Description |
---|---|
WriteFuture |
flush()
Flushes all buffers you wrote via
write(ByteBuffer) to
the session. |
void |
mergeAll()
Merges all buffers you wrote via
write(ByteBuffer) into
one ByteBuffer and replaces the old fragmented ones with it. |
void |
write(ByteBuffer buf)
Callback for
ProtocolEncoder to generate encoded
ByteBuffer s. |
void write(ByteBuffer buf)
ProtocolEncoder
to generate encoded
ByteBuffer
s. ProtocolEncoder
must call
write(ByteBuffer)
for each encoded message.buf
- the buffer which contains encoded datavoid mergeAll()
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.WriteFuture flush()
write(ByteBuffer)
to
the session. This operation is asynchronous; please wait for
the returned WriteFuture
if you want to wait for
the buffers flushed.Copyright © 2004-2019 Apache MINA Project. All Rights Reserved.