org.apache.mina.protocol
Interface ProtocolDecoder

All Known Implementing Classes:
CumulativeProtocolDecoder

public interface ProtocolDecoder

Decodes binary or protocol-specific data into higher-level message objects. MINA invokes decode(ProtocolSession, ByteBuffer, ProtocolDecoderOutput) method with read data, and then the decoder implementation puts decoded messages into ProtocolDecoderOutput by calling ProtocolDecoderOutput.write(Object).

Please refer to TextLineDecoder example.

Version:
$Rev: 264677 $, $Date: 2005-08-30 11:44:35 +0900 $
Author:
Trustin Lee (trustin@apache.org)

Method Summary
 void decode(ProtocolSession session, ByteBuffer in, ProtocolDecoderOutput out)
          Decodes binary or protocol-specific content into higher-level message objects.
 

Method Detail

decode

void decode(ProtocolSession session,
            ByteBuffer in,
            ProtocolDecoderOutput out)
            throws ProtocolViolationException
Decodes binary or protocol-specific content into higher-level message objects. MINA invokes decode(ProtocolSession, ByteBuffer, ProtocolDecoderOutput) method with read data, and then the decoder implementation puts decoded messages into ProtocolDecoderOutput.

Throws:
ProtocolViolationException - if the read data violated protocol specification


Copyright © 2004-2005 . All Rights Reserved.