|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.mina.filter.codec.AbstractProtocolEncoderOutput
public abstract class AbstractProtocolEncoderOutput
A ProtocolEncoderOutput
based on queue.
Constructor Summary | |
---|---|
AbstractProtocolEncoderOutput()
|
Method Summary | |
---|---|
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 . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.mina.filter.codec.ProtocolEncoderOutput |
---|
flush |
Constructor Detail |
---|
public AbstractProtocolEncoderOutput()
Method Detail |
---|
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
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |