gr.uoa.di.madgik.commons.channel.events
Interface ISerializable

All Known Implementing Classes:
BytePayloadChannelEvent, ChannelPayloadStateEvent, ChannelStateEvent, DisposeChannelEvent, ObjectPayloadChannelEvent, StringPayloadChannelEvent

public interface ISerializable

Interface that must be implemented by objects that need to be passed through the ObjectPayloadChannelEvent. Implementing classes of this interface must also have a default constructor publicly available

Author:
gpapanikos

Method Summary
 void Decode(byte[] payload)
          Decodes the payload of the implementing object as it was returned by Encode()
 byte[] Encode()
          Encodes the payload of the implementing object so that is can later be unmarshaled
 java.lang.String GetSerializableClassName()
          Gets the class name of the object being serialized.
 

Method Detail

GetSerializableClassName

java.lang.String GetSerializableClassName()
Gets the class name of the object being serialized. This name is used to instantiate the object when unmarshaled

Returns:
the class name

Encode

byte[] Encode()
              throws java.lang.Exception
Encodes the payload of the implementing object so that is can later be unmarshaled

Returns:
the byte[] the encoded payload
Throws:
java.lang.Exception - The serialization could not be performed

Decode

void Decode(byte[] payload)
            throws java.lang.Exception
Decodes the payload of the implementing object as it was returned by Encode()

Parameters:
payload - the serialization
Throws:
java.lang.Exception - the Serialization could not be performed