org.apache.mina.filter.codec
Class AbstractProtocolEncoderOutput
java.lang.Object
org.apache.mina.filter.codec.AbstractProtocolEncoderOutput
- All Implemented Interfaces:
- ProtocolEncoderOutput
public abstract class AbstractProtocolEncoderOutput
- extends Object
- implements ProtocolEncoderOutput
A ProtocolEncoderOutput based on queue.
- Author:
- Apache MINA Project
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractProtocolEncoderOutput
public AbstractProtocolEncoderOutput()
getMessageQueue
public Queue<Object> getMessageQueue()
write
public void write(Object encodedMessage)
- Description copied from interface:
ProtocolEncoderOutput
- Callback for
ProtocolEncoder to generate an encoded message such
as an IoBuffer. ProtocolEncoder must call
ProtocolEncoderOutput.write(Object) for each encoded message.
- Specified by:
write in interface ProtocolEncoderOutput
- Parameters:
encodedMessage - the encoded message, typically an IoBuffer
or a FileRegion.
mergeAll
public void mergeAll()
- Description copied from interface:
ProtocolEncoderOutput
- Merges all buffers you wrote via
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 IoBuffers.
- Specified by:
mergeAll in interface ProtocolEncoderOutput
Copyright © 2004-2009 Apache MINA Project. All Rights Reserved.