org.objectweb.dream.message.codec
Interface MessageCodec

All Known Implementing Classes:
BasicNonExtensibleMessageCodecImpl, BasicStreamMessageCodecImpl

public interface MessageCodec

Message managment interface to encode/decode messages on streams .


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

Field Detail

ITF_NAME

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

See Also:
Constant Field Values
Method Detail

encode

public void encode(Object stream,
                   Message message)
            throws IOException
Encodes the given message on the given stream.

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

decode

public Message decode(Object stream)
               throws IOException
Deserializes a message from the given stream

Parameters:
stream - a stream on which the message is decoded.
Returns:
a message
Throws:
IOException - if an error occurs during the deserialization.


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