org.objectweb.dream.message.codec
Interface MessageCodec

All Known Implementing Classes:
AbstractDelegatingMessageCodecImpl, MessageCodecHelperCompositeMessageDataStreamImpl, MessageCodecHelperObjectStreamImpl, MessageCodecPrimitiveObjectStreamImpl, MessageCreatorBasicImpl

public interface MessageCodec

Message management interface to encode/decode messages on CodecInputOutput.


Field Summary
static String ITF_NAME
          The commonly used name of refer to this interface.
 
Method Summary
 Message decode(CodecInputOutput cio)
          De-serializes a message from the given stream.
 void encode(CodecInputOutput cio, Message message)
          Encodes the given message on the given stream.
 

Field Detail

ITF_NAME

static final String ITF_NAME
The commonly used name of refer to this interface.

See Also:
Constant Field Values
Method Detail

encode

void encode(CodecInputOutput cio,
            Message message)
            throws IOException
Encodes the given message on the given stream. This method is responsible to encode the given message and its sub messages recursively.

Parameters:
cio - contains the input on which the message is encoded.
message - a message to serialize.
Throws:
IOException - if an error occurs during the serialization.

decode

Message decode(CodecInputOutput cio)
               throws IOException
De-serializes a message from the given stream. This method is responsible to decode the given message and its sub messages recursively.

Parameters:
cio - contains the output on which the message is decoded.
Returns:
a message
Throws:
IOException - if an error occurs during the de-serialization.


Copyright © 2003, 2005 - INRIA Rhone-Alpes - All Rights Reserved.