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

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.DisposeChannelEvent
All Implemented Interfaces:
ISerializable

public class DisposeChannelEvent
extends ChannelStateEvent

Event indicating that the channel is being disposed by one of its nozzles. Even if multiple nozzles are registered, once a single nozzle emits this event, the ChannelRegistry purges the registry from the associated entry

Author:
gpapanikos

Constructor Summary
DisposeChannelEvent()
          Instantiates a new dispose channel event.
DisposeChannelEvent(ChannelRegistryKey RegistryKey)
          Instantiates a new dispose 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.
 ChannelRegistryKey GetRegistryKey()
          Gets the registry key of the disposed channel
 java.lang.String GetSerializableClassName()
          Gets the class name of the object being serialized.
 
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

DisposeChannelEvent

public DisposeChannelEvent()
Instantiates a new dispose channel event.


DisposeChannelEvent

public DisposeChannelEvent(ChannelRegistryKey RegistryKey)
Instantiates a new dispose channel event.

Parameters:
RegistryKey - the registry key
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

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

GetRegistryKey

public ChannelRegistryKey GetRegistryKey()
Gets the registry key of the disposed channel

Returns:
the channel registry key

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