org.apache.mina.protocol
Class SimpleProtocolEncoderOutput
java.lang.Object
org.apache.mina.protocol.SimpleProtocolEncoderOutput
- All Implemented Interfaces:
- ProtocolEncoderOutput
public class SimpleProtocolEncoderOutput
- extends Object
- implements ProtocolEncoderOutput
A ProtocolEncoderOutput
based on queue.
- Version:
- $Rev: 210062 $, $Date: 2005-07-11 12:52:38 +0900 $
- Author:
- The Apache Directory Project (dev@directory.apache.org), Trustin Lee (trustin@apache.org)
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SimpleProtocolEncoderOutput
public SimpleProtocolEncoderOutput()
getBufferQueue
public Queue getBufferQueue()
write
public void write(ByteBuffer buf)
- Description copied from interface:
ProtocolEncoderOutput
- Callback for
ProtocolEncoder
to generate encoded
ByteBuffer
s. ProtocolEncoder
must call
ProtocolEncoderOutput.write(ByteBuffer)
for each decoded messages.
- Specified by:
write
in interface ProtocolEncoderOutput
- Parameters:
buf
- the buffer which contains encoded data
mergeAll
public void mergeAll()
- Description copied from interface:
ProtocolEncoderOutput
- Merges all buffers you wrote via
ProtocolEncoderOutput.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.
- Specified by:
mergeAll
in interface ProtocolEncoderOutput
Copyright © 2004-2005 . All Rights Reserved.