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

java.lang.Object
  extended by java.util.Observable
      extended by gr.uoa.di.madgik.execution.event.ExecutionStateEvent
          extended by gr.uoa.di.madgik.execution.event.ExecutionExternalProgressReportStateEvent

public class ExecutionExternalProgressReportStateEvent
extends ExecutionStateEvent

Event signaling the progress of the execution of an external to the engine element. This event can either just contain a message that is emitted back to the client or it can also report a progress indication.

Author:
gpapanikos

Nested Class Summary
 
Nested classes/interfaces inherited from class gr.uoa.di.madgik.execution.event.ExecutionStateEvent
ExecutionStateEvent.EventName
 
Constructor Summary
ExecutionExternalProgressReportStateEvent()
          Instantiates a new execution external progress report state event.
ExecutionExternalProgressReportStateEvent(String ID, String ExternalSender, int CurrentStep, int TotalSteps)
          Instantiates a new execution external progress report state event.
ExecutionExternalProgressReportStateEvent(String ID, String ExternalSender, int CurrentStep, int TotalSteps, String Message)
          Instantiates a new execution external progress report state event.
ExecutionExternalProgressReportStateEvent(String ID, String ExternalSender, String Message)
          Instantiates a new execution external progress report state event.
 
Method Summary
 void Decode(byte[] buf)
          Decode.
 boolean DoesReportProgress()
          Does report progress.
 void DoesReportProgress(boolean ReportsProgress)
          Does report progress.
 byte[] Encode()
          Encode.
 int GetCurrentStep()
          Gets the current step.
 long GetEmitTimestamp()
          Gets the timestamp the event was emitted.
 ExecutionStateEvent.EventName GetEventName()
          Gets the event name.
 String GetExternalSender()
          Gets the external sender.
 String GetID()
          Gets the id.
 String GetMessage()
          Gets the message.
 int GetTotalSteps()
          Gets the total steps.
 void SetCurrentStep(int CurrentStep)
          Sets the current step.
 void SetExternalSender(String ExternalSender)
          Sets the external sender.
 void SetMessage(String Message)
          Sets the message.
 void SetTotalSteps(int TotalSteps)
          Sets the total steps.
 
Methods inherited from class gr.uoa.di.madgik.execution.event.ExecutionStateEvent
SetChanged
 
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

ExecutionExternalProgressReportStateEvent

public ExecutionExternalProgressReportStateEvent()
Instantiates a new execution external progress report state event.


ExecutionExternalProgressReportStateEvent

public ExecutionExternalProgressReportStateEvent(String ID,
                                                 String ExternalSender,
                                                 String Message)
Instantiates a new execution external progress report state event.

Parameters:
ID - the iD of the plan element responsible for the external component emitting the event
ExternalSender - the external sender
Message - the message

ExecutionExternalProgressReportStateEvent

public ExecutionExternalProgressReportStateEvent(String ID,
                                                 String ExternalSender,
                                                 int CurrentStep,
                                                 int TotalSteps)
Instantiates a new execution external progress report state event.

Parameters:
ID - the iD of the plan element responsible for the external component emitting the event
ExternalSender - the external sender
CurrentStep - the current step the current step of the execution
TotalSteps - the total steps the total steps of the execution

ExecutionExternalProgressReportStateEvent

public ExecutionExternalProgressReportStateEvent(String ID,
                                                 String ExternalSender,
                                                 int CurrentStep,
                                                 int TotalSteps,
                                                 String Message)
Instantiates a new execution external progress report state event.

Parameters:
ID - the iD of the plan element responsible for the external component emitting the event
ExternalSender - the external sender
CurrentStep - the current step the current step of the execution
TotalSteps - the total steps the total steps of the execution
Message - the message
Method Detail

GetID

public String GetID()
Gets the id.

Returns:
the string

DoesReportProgress

public boolean DoesReportProgress()
Does report progress.

Returns:
true, if successful

DoesReportProgress

public void DoesReportProgress(boolean ReportsProgress)
Does report progress.

Parameters:
ReportsProgress - the reports progress

GetCurrentStep

public int GetCurrentStep()
Gets the current step.

Returns:
the int

SetCurrentStep

public void SetCurrentStep(int CurrentStep)
Sets the current step.

Parameters:
CurrentStep - the current step

GetTotalSteps

public int GetTotalSteps()
Gets the total steps.

Returns:
the int

SetTotalSteps

public void SetTotalSteps(int TotalSteps)
Sets the total steps.

Parameters:
TotalSteps - the total steps

GetMessage

public String GetMessage()
Gets the message.

Returns:
the string

SetMessage

public void SetMessage(String Message)
Sets the message.

Parameters:
Message - the message

GetExternalSender

public String GetExternalSender()
Gets the external sender.

Returns:
the string

SetExternalSender

public void SetExternalSender(String ExternalSender)
Sets the external sender.

Parameters:
ExternalSender - the external sender

GetEventName

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

Specified by:
GetEventName in class ExecutionStateEvent
Returns:
the event name

GetEmitTimestamp

public long GetEmitTimestamp()
Description copied from class: ExecutionStateEvent
Gets the timestamp the event was emitted.

Specified by:
GetEmitTimestamp in class ExecutionStateEvent
Returns:
the long

Decode

public void Decode(byte[] buf)
            throws ExecutionSerializationException
Description copied from class: ExecutionStateEvent
Decode.

Specified by:
Decode in class ExecutionStateEvent
Parameters:
buf - the byte array containing the encoded event as serialized by ExecutionStateEvent.Encode()
Throws:
ExecutionSerializationException - A serialization error occurred

Encode

public byte[] Encode()
              throws ExecutionSerializationException
Description copied from class: ExecutionStateEvent
Encode.

Specified by:
Encode in class ExecutionStateEvent
Returns:
the byte array containing the encoded event
Throws:
ExecutionSerializationException - A serialization error occurred


Copyright © 2013. All Rights Reserved.