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

java.lang.Object
  extended by java.util.Observable
      extended by gr.uoa.di.madgik.commons.channel.events.ChannelStateEvent
All Implemented Interfaces:
ISerializable
Direct Known Subclasses:
ChannelPayloadStateEvent, DisposeChannelEvent

public abstract class ChannelStateEvent
extends java.util.Observable
implements ISerializable

Base class for every object that can be used to be registered by an Observer or send as Event. Event handling must follow well known guidelines. The most important of all as it could have a dramatic effect on the framework usage is the processing of a caught event. When an event is caught the processing to be performed should be kept minimal. Should a proxy for example catches an event and in the event handler communicates with a remote location this would mean that the whole framework will have to wait for this communication to happen.

Author:
gpapanikos

Constructor Summary
ChannelStateEvent()
           
 
Method Summary
 java.lang.String GetEmitingNozzleID()
          Retrieves the emitting nozzle UUID of the event associated with it during initialization
 long GetEmitingNozzleIdentifierLeastSignificantBits()
          Gets the emitting nozzle identifier least significant bits.
 long GetEmitingNozzleIdentifierMostSignificantBits()
          Gets the emitting nozzle identifier most significant bits.
abstract  ChannelState.EventName GetEventName()
          Gets the event name.
 void NotifyChange(ChannelStateEvent ChangeEvent)
          Notify everyone that has registered for notifications to this object.
 void SetEmitingNozzleIdentifierLeastSignificantBits(long EmitingNozzleIdentifierLeastSignificantBits)
          Sets the emitting nozzle identifier least significant bits.
 void SetEmitingNozzleIdentifierMostSignificantBits(long EmitingNozzleIdentifierMostSignificantBits)
          Sets the emitting nozzle identifier most significant bits.
 
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
 
Methods inherited from interface gr.uoa.di.madgik.commons.channel.events.ISerializable
Decode, Encode, GetSerializableClassName
 

Constructor Detail

ChannelStateEvent

public ChannelStateEvent()
Method Detail

NotifyChange

public void NotifyChange(ChannelStateEvent ChangeEvent)
Notify everyone that has registered for notifications to this object. The argument of the update notification is the ChannelStateEvent that carries the information of the update not the ChannelStateEvent that the Observer has originally registered with

Parameters:
ChangeEvent - The ChannelStateEvent carrying the update information

GetEventName

public abstract ChannelState.EventName GetEventName()
Gets the event name.

Returns:
the channel state. event name

GetEmitingNozzleIdentifierLeastSignificantBits

public long GetEmitingNozzleIdentifierLeastSignificantBits()
Gets the emitting nozzle identifier least significant bits.

Returns:
the long

GetEmitingNozzleIdentifierMostSignificantBits

public long GetEmitingNozzleIdentifierMostSignificantBits()
Gets the emitting nozzle identifier most significant bits.

Returns:
the long

SetEmitingNozzleIdentifierLeastSignificantBits

public void SetEmitingNozzleIdentifierLeastSignificantBits(long EmitingNozzleIdentifierLeastSignificantBits)
Sets the emitting nozzle identifier least significant bits.

Parameters:
EmitingNozzleIdentifierLeastSignificantBits - the emitting nozzle identifier least significant bits

SetEmitingNozzleIdentifierMostSignificantBits

public void SetEmitingNozzleIdentifierMostSignificantBits(long EmitingNozzleIdentifierMostSignificantBits)
Sets the emitting nozzle identifier most significant bits.

Parameters:
EmitingNozzleIdentifierMostSignificantBits - the emitting nozzle identifier most significant bits

GetEmitingNozzleID

public java.lang.String GetEmitingNozzleID()
Retrieves the emitting nozzle UUID of the event associated with it during initialization

Returns:
The emitting nozzle UUID of the event as returned by SerializeEmmitingNozzleID()