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

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.ExecutionProgressReportStateEvent

public class ExecutionProgressReportStateEvent
extends ExecutionStateEvent

Event signaling the progress of the execution of a plan 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
ExecutionProgressReportStateEvent()
          Instantiates a new execution progress report state event.
ExecutionProgressReportStateEvent(String ID, int CurrentStep, int TotalSteps)
          Instantiates a new execution progress report state event.
ExecutionProgressReportStateEvent(String ID, int CurrentStep, int TotalSteps, String Message)
          Instantiates a new execution progress report state event.
ExecutionProgressReportStateEvent(String ID, int SuccessfulNodes, int TotalNodes, String Message, boolean ReportsNodeStatus)
          Instantiates a new execution progress report state event.
ExecutionProgressReportStateEvent(String ID, int CurrentStep, int TotalSteps, String Message, String NodeName, String NodeHostName, int NodePort)
          Instantiates a new execution progress report state event.
ExecutionProgressReportStateEvent(String ID, String Message)
          Instantiates a new execution progress report state event.
 
Method Summary
 void Decode(byte[] buf)
          Decode.
 boolean DoesReportNodeProgress()
          Does report node progress.
 boolean DoesReportNodeStatus()
          Does report node status.
 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 GetID()
          Gets the id.
 String GetMessage()
          Gets the message.
 String GetNodeHostName()
          Gets the node host name.
 String GetNodeName()
          Gets the node name.
 int GetNodePort()
          Gets the node port.
 int GetTotalSteps()
          Gets the total steps.
 void SetCurrentStep(int CurrentStep)
          Sets the current step.
 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

ExecutionProgressReportStateEvent

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


ExecutionProgressReportStateEvent

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

Parameters:
ID - the iD of the plan element emitting the event
Message - the message

ExecutionProgressReportStateEvent

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

Parameters:
ID - the iD of the plan element emitting the event
CurrentStep - the current step the current step of the execution
TotalSteps - the total steps the total steps of the execution

ExecutionProgressReportStateEvent

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

Parameters:
ID - the iD of the plan element emitting the event
CurrentStep - the current step the current step of the execution
TotalSteps - the total steps the total steps of the execution
Message - the message

ExecutionProgressReportStateEvent

public ExecutionProgressReportStateEvent(String ID,
                                         int SuccessfulNodes,
                                         int TotalNodes,
                                         String Message,
                                         boolean ReportsNodeStatus)
Instantiates a new execution progress report state event.

Parameters:
ID - the iD of the plan element emitting the event
SuccessfulNodes - the number of nodes which completed execution successfully
TotalNodes - the total number of nodes in the execution
ReportsNodeStatus - should be true to enable node status retrieval
Message - the message

ExecutionProgressReportStateEvent

public ExecutionProgressReportStateEvent(String ID,
                                         int CurrentStep,
                                         int TotalSteps,
                                         String Message,
                                         String NodeName,
                                         String NodeHostName,
                                         int NodePort)
Instantiates a new execution progress report state event.

Parameters:
ID - the iD of the plan element emitting the event
CurrentStep - the current step the current step of the execution
TotalSteps - the total steps the total steps of the execution
NodeName -
NodeHostName -
NodePort -
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

DoesReportNodeProgress

public boolean DoesReportNodeProgress()
Does report node progress.

Returns:
true, if successful

DoesReportNodeStatus

public boolean DoesReportNodeStatus()
Does report node status.

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

GetNodeName

public String GetNodeName()
Gets the node name.

Returns:
the string

GetNodeHostName

public String GetNodeHostName()
Gets the node host name.

Returns:
the string

GetNodePort

public int GetNodePort()
Gets the node port.

Returns:
the string

SetMessage

public void SetMessage(String Message)
Sets the message.

Parameters:
Message - the message

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.