gr.uoa.di.madgik.commons.channel.events
Class StringPayloadChannelEvent

java.lang.Object
  extended by java.util.Observable
      extended by gr.uoa.di.madgik.commons.channel.events.ChannelStateEvent
          extended by gr.uoa.di.madgik.commons.channel.events.ChannelPayloadStateEvent
              extended by gr.uoa.di.madgik.commons.channel.events.StringPayloadChannelEvent
All Implemented Interfaces:
ISerializable

public class StringPayloadChannelEvent
extends ChannelPayloadStateEvent

Event containing payload that the sender wants to provide to listeners

Author:
gpapanikos

Constructor Summary
StringPayloadChannelEvent()
          Instantiates a new string payload channel event.
StringPayloadChannelEvent(java.lang.String Value)
          Instantiates a new string payload channel event.
 
Method Summary
 void Decode(byte[] payload)
          Decodes the payload of the implementing object as it was returned by ISerializable.Encode()
 byte[] Encode()
          Encodes the payload of the implementing object so that is can later be unmarshaled
 ChannelState.EventName GetEventName()
          Gets the event name.
 java.lang.String GetSerializableClassName()
          Gets the class name of the object being serialized.
 java.lang.String GetValue()
          Retrieves the payload the event contains
 void SetValue(java.lang.String Value)
          Sets the contained payload
 
Methods inherited from class gr.uoa.di.madgik.commons.channel.events.ChannelStateEvent
GetEmitingNozzleID, GetEmitingNozzleIdentifierLeastSignificantBits, GetEmitingNozzleIdentifierMostSignificantBits, NotifyChange, SetEmitingNozzleIdentifierLeastSignificantBits, SetEmitingNozzleIdentifierMostSignificantBits
 
Methods inherited from class java.util.Observable
addObserver, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringPayloadChannelEvent

public StringPayloadChannelEvent()
Instantiates a new string payload channel event.


StringPayloadChannelEvent

public StringPayloadChannelEvent(java.lang.String Value)
Instantiates a new string payload channel event.

Parameters:
Value - the payload that the event contains
Method Detail

GetEventName

public ChannelState.EventName GetEventName()
Description copied from class: ChannelStateEvent
Gets the event name.

Specified by:
GetEventName in class ChannelStateEvent
Returns:
the channel state. event name

GetValue

public java.lang.String GetValue()
Retrieves the payload the event contains

Returns:
the contained payload

SetValue

public void SetValue(java.lang.String Value)
Sets the contained payload

Parameters:
Value - the contained payload

GetSerializableClassName

public java.lang.String GetSerializableClassName()
Description copied from interface: ISerializable
Gets the class name of the object being serialized. This name is used to instantiate the object when unmarshaled

Returns:
the class name

Decode

public void Decode(byte[] payload)
            throws java.lang.Exception
Description copied from interface: ISerializable
Decodes the payload of the implementing object as it was returned by ISerializable.Encode()

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

Encode

public byte[] Encode()
              throws java.lang.Exception
Description copied from interface: ISerializable
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