|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectgr.uoa.di.madgik.execution.plan.element.PlanElementBase
gr.uoa.di.madgik.execution.plan.element.FlowPlanElement
public class FlowPlanElement
This plan element acts as a container of other IPlanElements. It orchestrates their execution by
executing the elements that are contained in the ElementCollection in parallel
and waiting for their completion. If one of the elements is terminated with an error, after all the elements
have terminated, the exception indicating the error is re-thrown. If more than one elements finished with an
error, only the first error found iterating through the ElementCollection is thrown.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class gr.uoa.di.madgik.execution.plan.element.PlanElementBase |
|---|
PlanElementBase.ClockType |
| Nested classes/interfaces inherited from interface gr.uoa.di.madgik.execution.plan.element.IPlanElement |
|---|
IPlanElement.PlanElementType |
| Field Summary | |
|---|---|
List<IPlanElement> |
ElementCollection
The Element collection that are to be executed in parallel |
| Constructor Summary | |
|---|---|
FlowPlanElement()
|
|
| Method Summary | |
|---|---|
void |
ExecuteExtender(ExecutionHandle Handle)
Execute extender. |
void |
FromXML(Element XML)
Populate the element from its xml serialization as returned by IPlanElement.ToXML() |
void |
FromXML(String XML)
Populate the element from its xml serialization as returned by IPlanElement.ToXML() |
List<ContingencyTrigger> |
GetContingencyTriggers()
Gets the contingency triggers. |
Logger |
GetExtenderLogger()
Gets the extender logger. |
String |
GetID()
Gets the id. |
Set<String> |
GetModifiedVariableNames()
Gets the modified variable names of the element and of the elements contained. |
String |
GetName()
Gets the name. |
Set<String> |
GetNeededVariableNames()
Gets the needed variable names of the element and of the elements contained. |
IPlanElement.PlanElementType |
GetPlanElementType()
Gets the plan element type. |
Iterator<IPlanElement> |
iterator()
|
IPlanElement |
Locate(String ID)
Locate the plan element with the provided id. |
Set<IPlanElement> |
LocateActionElements()
Retrieves the Action elements under this elements |
void |
SetContingencyResourcePick(ExecutionHandle Handle,
String Pick)
Sets the picked resource in case the IContingencyReaction.ReactionType#Pick reaction is supported |
void |
SetName(String Name)
Sets the name. |
IContingencyReaction.ReactionType[] |
SupportedContingencyTriggers()
Retrieves the supported contingency triggers. |
boolean |
SupportsContingencyTriggers()
Checks if the element supports contingency triggers. |
String |
ToXML()
Serialize to xml the element and all its contained elements |
void |
Validate()
Validate the element and any sub element it contains |
void |
ValidatePreExecution(ExecutionHandle Handle)
Validate the element and any sub element it contains before it is executed |
| Methods inherited from class gr.uoa.di.madgik.execution.plan.element.PlanElementBase |
|---|
CheckStatus, Execute, ExecuteWithStateAwareness, GetPerformanceEvent, RegisterToRunningActionElementsRestriction, ResetClocks, StartClock, StopClock, UnregisterToRunningActionElementsRestriction, update |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public List<IPlanElement> ElementCollection
| Constructor Detail |
|---|
public FlowPlanElement()
| Method Detail |
|---|
public Iterator<IPlanElement> iterator()
iterator in interface Iterable<IPlanElement>
public void FromXML(String XML)
throws ExecutionSerializationException
IPlanElementIPlanElement.ToXML()
FromXML in interface IPlanElementXML - the xML serialization
ExecutionSerializationException - A serialization error occurred
public void FromXML(Element XML)
throws ExecutionSerializationException
IPlanElementIPlanElement.ToXML()
FromXML in interface IPlanElementXML - the xML serialization
ExecutionSerializationException - A serialization error occurredpublic String GetID()
IPlanElement
GetID in interface IPlanElementpublic String GetName()
IPlanElement
GetName in interface IPlanElementpublic IPlanElement.PlanElementType GetPlanElementType()
IPlanElement
GetPlanElementType in interface IPlanElementpublic IPlanElement Locate(String ID)
IPlanElement
Locate in interface IPlanElementID - the iD
public Set<IPlanElement> LocateActionElements()
IPlanElement
LocateActionElements in interface IPlanElementpublic void SetName(String Name)
IPlanElement
SetName in interface IPlanElementName - the name
public String ToXML()
throws ExecutionSerializationException
IPlanElement
ToXML in interface IPlanElementExecutionSerializationException - A serialization error occurred
public void Validate()
throws ExecutionValidationException
IPlanElement
Validate in interface IPlanElementExecutionValidationException - A validation error occurredpublic IContingencyReaction.ReactionType[] SupportedContingencyTriggers()
IPlanElement
SupportedContingencyTriggers in interface IPlanElementpublic boolean SupportsContingencyTriggers()
IPlanElement
SupportsContingencyTriggers in interface IPlanElementpublic List<ContingencyTrigger> GetContingencyTriggers()
IPlanElement
GetContingencyTriggers in interface IPlanElement
public void SetContingencyResourcePick(ExecutionHandle Handle,
String Pick)
throws ExecutionRunTimeException
IPlanElementIContingencyReaction.ReactionType#Pick reaction is supported
SetContingencyResourcePick in interface IPlanElementHandle - the execution handle handlePick - the picked resource
ExecutionRunTimeException - A runtime error occurredpublic Set<String> GetModifiedVariableNames()
IPlanElement
GetModifiedVariableNames in interface IPlanElementpublic Set<String> GetNeededVariableNames()
IPlanElement
GetNeededVariableNames in interface IPlanElementpublic Logger GetExtenderLogger()
PlanElementBase
GetExtenderLogger in class PlanElementBase
public void ExecuteExtender(ExecutionHandle Handle)
throws ExecutionRunTimeException,
ExecutionInternalErrorException,
ExecutionCancelException,
ExecutionBreakException
PlanElementBase
ExecuteExtender in class PlanElementBaseHandle - the execution handle
ExecutionRunTimeException - A runtime error occurred
ExecutionInternalErrorException - An internal error occurred
ExecutionCancelException - The execution was canceled
ExecutionBreakException - The execution was terminated
public void ValidatePreExecution(ExecutionHandle Handle)
throws ExecutionValidationException
IPlanElement
ValidatePreExecution in interface IPlanElementHandle - the execution handle
ExecutionValidationException - A validation error occurred
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||