gr.uoa.di.madgik.execution.event
Class ExecutionStateEvent

java.lang.Object
  extended by java.util.Observable
      extended by gr.uoa.di.madgik.execution.event.ExecutionStateEvent
Direct Known Subclasses:
ExecutionCancelStateEvent, ExecutionCompletedStateEvent, ExecutionExternalProgressReportStateEvent, ExecutionPauseStateEvent, ExecutionPerformanceReportStateEvent, ExecutionProgressReportStateEvent, ExecutionResumeStateEvent, ExecutionStartedStateEvent

public abstract class ExecutionStateEvent
extends Observable

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.

Author:
gpapanikos

Nested Class Summary
static class ExecutionStateEvent.EventName
          The typed name of event
 
Constructor Summary
ExecutionStateEvent()
           
 
Method Summary
abstract  void Decode(byte[] buf)
          Decode.
abstract  byte[] Encode()
          Encode.
abstract  long GetEmitTimestamp()
          Gets the timestamp the event was emitted.
abstract  ExecutionStateEvent.EventName GetEventName()
          Gets the event name.
 void SetChanged()
          Sets that the event is carrying updated information.
 
Methods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExecutionStateEvent

public ExecutionStateEvent()
Method Detail

SetChanged

public void SetChanged()
Sets that the event is carrying updated information.


GetEventName

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

Returns:
the event name

GetEmitTimestamp

public abstract long GetEmitTimestamp()
Gets the timestamp the event was emitted.

Returns:
the long

Encode

public abstract byte[] Encode()
                       throws ExecutionSerializationException
Encode.

Returns:
the byte array containing the encoded event
Throws:
ExecutionSerializationException - A serialization error occurred

Decode

public abstract void Decode(byte[] buf)
                     throws ExecutionSerializationException
Decode.

Parameters:
buf - the byte array containing the encoded event as serialized by Encode()
Throws:
ExecutionSerializationException - A serialization error occurred


Copyright © 2013. All Rights Reserved.