public abstract class AbstractProtocolEncoderOutput extends java.lang.Object implements ProtocolEncoderOutput
ProtocolEncoderOutput
based on queue.Constructor and Description |
---|
AbstractProtocolEncoderOutput() |
Modifier and Type | Method and Description |
---|---|
java.util.Queue<java.lang.Object> |
getMessageQueue() |
void |
mergeAll()
Merges all buffers you wrote via
ProtocolEncoderOutput.write(Object) into
one IoBuffer and replaces the old fragmented ones with it. |
void |
write(java.lang.Object encodedMessage)
Callback for
ProtocolEncoder to generate an encoded message such
as an IoBuffer . |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
flush
public java.util.Queue<java.lang.Object> getMessageQueue()
public void write(java.lang.Object encodedMessage)
ProtocolEncoderOutput
ProtocolEncoder
to generate an encoded message such
as an IoBuffer
. ProtocolEncoder
must call
ProtocolEncoderOutput.write(Object)
for each encoded message.write
in interface ProtocolEncoderOutput
encodedMessage
- the encoded message, typically an IoBuffer
or a FileRegion
.public void mergeAll()
ProtocolEncoderOutput
ProtocolEncoderOutput.write(Object)
into
one IoBuffer
and replaces the old fragmented ones with it.
This method is useful when you want to control the way MINA generates
network packets. Please note that this method only works when you
called ProtocolEncoderOutput.write(Object)
method with only IoBuffer
s.mergeAll
in interface ProtocolEncoderOutput
Copyright © 2004-2019 Apache MINA Project. All Rights Reserved.