org.objectweb.dream.message.codec
Class BasicStreamMessageCodecImpl
java.lang.Object
org.objectweb.dream.AbstractComponent
org.objectweb.dream.message.codec.BasicStreamMessageCodecImpl
- All Implemented Interfaces:
- BindingController, LifeCycleController, Loggable, MessageCodec
- public class BasicStreamMessageCodecImpl
- extends AbstractComponent
- implements MessageCodec
Basic implementation of a message codec. It encodes or decodes messages using
ObjectOutput
and ObjectInput
.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
messageManagerItf
protected MessageManager messageManagerItf
BasicStreamMessageCodecImpl
public BasicStreamMessageCodecImpl()
decode
public Message decode(Object stream)
throws IOException
- Can decode message from an
ObjectInput
or from an
InputStream
. If the given stream is an InputStream
, an
ObjectInputStream
is created, the message is red, then the
ObjectInputStream
is closed.
- Specified by:
decode
in interface MessageCodec
- Parameters:
stream
- a stream on which the message is decoded.
- Returns:
- a message
- Throws:
IOException
- if an error occurs during the deserialization.- See Also:
MessageCodec.decode(Object)
encode
public void encode(Object stream,
Message message)
throws IOException
- Can encode message to an
ObjectOutput
or to an
OutputStream
. If the given stream is an OutputStream
, an
ObjectOutputStream
is created, the message is written, then the
ObjectOutputStream
is closed.
- Specified by:
encode
in interface MessageCodec
- Parameters:
stream
- a stream on which the message is encoded.message
- a message to serialize.
- Throws:
IOException
- if an error occurs during the serialization.- See Also:
MessageCodec.encode(Object, Message)
listFc
public String[] listFc()
- Specified by:
listFc
in interface BindingController
- See Also:
BindingController.listFc()
bindFc
public void bindFc(String clientItfName,
Object serverItf)
throws NoSuchInterfaceException,
IllegalBindingException,
IllegalLifeCycleException
- Specified by:
bindFc
in interface BindingController
- Overrides:
bindFc
in class AbstractComponent
- Throws:
NoSuchInterfaceException
IllegalBindingException
IllegalLifeCycleException
- See Also:
BindingController.bindFc(String,
Object)
Copyright © 2003, 2004 - INRIA Rhone-Alpes - All Rights Reserved.