org.objectweb.dream.message.codec
Class AbstractMessageCodecObjectStream
java.lang.Object
org.objectweb.dream.AbstractComponent
org.objectweb.dream.message.codec.AbstractMessageCodecDataStream
org.objectweb.dream.message.codec.AbstractMessageCodecObjectStream
- All Implemented Interfaces:
- AttributeController, BindingController, LifeCycleController, Loggable, MessageCodec, MessageCodecObjectStreamAttributeController
- Direct Known Subclasses:
- MessageCodecOptimizedStreamImpl, MessageCodecStreamImpl
- public abstract class AbstractMessageCodecObjectStream
- extends AbstractMessageCodecDataStream
- implements MessageCodecObjectStreamAttributeController
Abstract codec implementation for codec using ObjectOutputStream
and
ObjectInputStream
. This codec implementation requires
InputStream
as codec input and OutputStream
as codec
output.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractMessageCodecObjectStream
public AbstractMessageCodecObjectStream()
encode
public void encode(CodecInputOutput cio,
Message message)
throws IOException
- Description copied from interface:
MessageCodec
- Encodes the given message on the given stream. This method is responsible
to encode the given message and its sub messages recursivly.
- Specified by:
encode
in interface MessageCodec
- 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.- See Also:
MessageCodec.encode(CodecInputOutput, Message)
decode
public Message decode(CodecInputOutput cio)
throws IOException
- Description copied from interface:
MessageCodec
- Deserializes a message from the given stream. This method is responsible to
decode the given message and its sub messages recursivly.
- Specified by:
decode
in interface MessageCodec
- Parameters:
cio
- contains the output on which the message is decoded.
- Returns:
- a message
- Throws:
IOException
- if an error occurs during the deserialization.- See Also:
MessageCodec.decode(CodecInputOutput)
getReuseObjectStream
public boolean getReuseObjectStream()
- Description copied from interface:
MessageCodecObjectStreamAttributeController
- Returns the
reuseObjectStream
attribute value.
- Specified by:
getReuseObjectStream
in interface MessageCodecObjectStreamAttributeController
- Returns:
- the
reuseObjectStream
attribute value. - See Also:
MessageCodecObjectStreamAttributeController.getReuseObjectStream()
setReuseObjectStream
public void setReuseObjectStream(boolean reuseObjectStream)
- Description copied from interface:
MessageCodecObjectStreamAttributeController
- Sets the
reuseObjectStream
attribute.
- Specified by:
setReuseObjectStream
in interface MessageCodecObjectStreamAttributeController
- Parameters:
reuseObjectStream
- the new reuseObjectStream
attribute
value.- See Also:
MessageCodecObjectStreamAttributeController.setReuseObjectStream(boolean)
Copyright © 2003, 2004 - INRIA Rhone-Alpes - All Rights Reserved.