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.
- Version:
- $Rev: 671827 $, $Date: 2008-06-26 10:49:48 +0200 (Do, 26 Jun 2008) $
- Author:
- The Apache MINA Project (dev@mina.apache.org)
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 IoBuffer
s.
- Specified by:
mergeAll
in interface ProtocolEncoderOutput
Copyright © 2004-2010 Apache MINA Project. All Rights Reserved.