org.objectweb.dream.message.codec
Class MessageCodecHelperObjectStreamImpl
java.lang.Object
org.objectweb.dream.AbstractComponent
org.objectweb.dream.message.codec.AbstractDelegatingMessageCodecImpl
org.objectweb.dream.message.codec.MessageCodecHelperObjectStreamImpl
- All Implemented Interfaces:
- ContextualBindingController, NeedAsyncStartController, PrepareStopLifeCycleController, Loggable, MessageCodec, MessageCodecHelperObjectStreamAttributeController, AttributeController, BindingController, LifeCycleController
public class MessageCodecHelperObjectStreamImpl
- extends AbstractDelegatingMessageCodecImpl
- implements MessageCodecHelperObjectStreamAttributeController
Codec helper component for codecs using ObjectOutputStream
and
ObjectInputStream
. It manages the creation and the reuse of
ObjectOutputStream
and ObjectInputStream
. This codec
implementation requires a InputStream
as input and a
OutputStream
as output.
Methods inherited from class org.objectweb.dream.AbstractComponent |
beforeFirstStart, bindFc, getFcNeedAsyncStart, getFcState, initComponent, lookupFc, prepareStopFc, setLogger, startFc, stopFc, unbindFc |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MessageCodecHelperObjectStreamImpl
public MessageCodecHelperObjectStreamImpl()
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 recursively.
- 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
- De-serializes a message from the given stream. This method is responsible
to decode the given message and its sub messages recursively.
- 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 de-serialization.- See Also:
MessageCodec.decode(CodecInputOutput)
getReuseObjectStream
public boolean getReuseObjectStream()
- Description copied from interface:
MessageCodecHelperObjectStreamAttributeController
- Returns the
reuseObjectStream
attribute value.
- Specified by:
getReuseObjectStream
in interface MessageCodecHelperObjectStreamAttributeController
- Returns:
- the
reuseObjectStream
attribute value. - See Also:
MessageCodecHelperObjectStreamAttributeController.getReuseObjectStream()
setReuseObjectStream
public void setReuseObjectStream(boolean reuseObjectStream)
- Description copied from interface:
MessageCodecHelperObjectStreamAttributeController
- Sets the
reuseObjectStream
attribute.
- Specified by:
setReuseObjectStream
in interface MessageCodecHelperObjectStreamAttributeController
- Parameters:
reuseObjectStream
- the new reuseObjectStream
attribute
value.- See Also:
MessageCodecHelperObjectStreamAttributeController.setReuseObjectStream(boolean)
Copyright © 2003, 2005 - INRIA Rhone-Alpes - All Rights Reserved.