org.apache.mina.protocol
Interface ProtocolEncoderOutput

All Known Implementing Classes:
SimpleProtocolEncoderOutput

public interface ProtocolEncoderOutput

Callback for ProtocolEncoder to generate encoded ByteBuffers. ProtocolEncoder must call write(ByteBuffer) for each decoded messages.

Version:
$Rev: 210062 $, $Date: 2005-07-11 12:52:38 +0900 $
Author:
Trustin Lee (trustin@apache.org)

Method Summary
 void mergeAll()
          Merges all buffers you wrote via write(ByteBuffer) into one ByteBuffer and replaces the old fragmented ones with it.
 void write(ByteBuffer buf)
          Callback for ProtocolEncoder to generate encoded ByteBuffers.
 

Method Detail

write

void write(ByteBuffer buf)
Callback for ProtocolEncoder to generate encoded ByteBuffers. ProtocolEncoder must call write(ByteBuffer) for each decoded messages.

Parameters:
buf - the buffer which contains encoded data

mergeAll

void mergeAll()
Merges all buffers you wrote via 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.



Copyright © 2004-2005 . All Rights Reserved.