public class ShellPlanElement extends PlanElementBase
Command field. Any parameters it may require to be provided are specified
in the ArgumentParameters. Additionally, any environmental variables that need to
be present for the execution of the command can be defined in Environment. The execution of
the external executable is done using a ProcessBuilder. It is also possible to define the data that will be
written to the processe's standard input using the StdInParameter. The standard
output and standard error of the process can be retrieved by setting the StdOutParameter
and StdErrParameter respectively. these inputs and outputs can be retrieved / dumped
from /to files by setting the respective flags StdInIsFile, StdOutIsFile
and StdErrIsFilePlanElementBase.ClockTypeIPlanElement.PlanElementType| Modifier and Type | Field and Description |
|---|---|
List<AttributedInputParameter> |
ArgumentParameters
The parameters that should be provided to the process's executable
|
String |
Command
The executable that is to be started
|
List<EnvironmentKeyValue> |
Environment
The environmental variables that must be set for the process being started
|
List<ExceptionExitCodeMaping> |
ExitCodeErrors
A mapping of exit codes to the respective errors they should produce
|
boolean |
StdErrIsFile
A flag indicating that the standard error output should be stored in a file
|
ParameterFilterBase |
StdErrOnlineFilter
A filter that can be applied on the fly in the output of the element's standard error
|
IInputOutputParameter |
StdErrParameter
The parameter to store the product of the standard error output.
|
IOutputParameter |
StdExitValueParameter
The parameter where to store the exit value of the process
|
boolean |
StdInIsFile
A flag indicating that the standard input should be retrieved by a file
|
IInputParameter |
StdInParameter
The parameter to retrieve the products of the standard input.
|
boolean |
StdOutIsFile
A flag indicating that the standard output products should be stored in a file
|
ParameterFilterBase |
StdOutOnlineFilter
A filter that can be applied on the fly in the output of the element's standard output
|
IInputOutputParameter |
StdOutParameter
The parameter to store the product of the standard error output.
|
List<ContingencyTrigger> |
Triggers
The Triggers this element supports
|
| Constructor and Description |
|---|
ShellPlanElement() |
| Modifier and Type | Method and Description |
|---|---|
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.
|
org.slf4j.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.
|
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
|
CheckStatus, Execute, ExecuteWithStateAwareness, GetPerformanceEvent, RegisterToRunningActionElementsRestriction, ResetClocks, StartClock, StopClock, UnregisterToRunningActionElementsRestriction, updatepublic List<ContingencyTrigger> Triggers
public String Command
public List<AttributedInputParameter> ArgumentParameters
public IInputParameter StdInParameter
StdInIsFile is set then this parameter will hold
the file that the input should be read frompublic boolean StdInIsFile
public IInputOutputParameter StdOutParameter
StdOutIsFile is set then this parameter will hold
the file that the output was dumped topublic boolean StdOutIsFile
public ParameterFilterBase StdOutOnlineFilter
public IInputOutputParameter StdErrParameter
StdErrIsFile is set then this parameter will hold
the file that the output was dumped topublic boolean StdErrIsFile
public ParameterFilterBase StdErrOnlineFilter
public IOutputParameter StdExitValueParameter
public List<ExceptionExitCodeMaping> ExitCodeErrors
public List<EnvironmentKeyValue> Environment
public void FromXML(String XML) throws ExecutionSerializationException
IPlanElementIPlanElement.ToXML()XML - the xML serializationExecutionSerializationException - A serialization error occurredpublic void FromXML(Element XML) throws ExecutionSerializationException
IPlanElementIPlanElement.ToXML()XML - the xML serializationExecutionSerializationException - A serialization error occurredpublic String GetID()
IPlanElementpublic String GetName()
IPlanElementpublic IPlanElement.PlanElementType GetPlanElementType()
IPlanElementpublic IPlanElement Locate(String ID)
IPlanElementID - the iDpublic Set<IPlanElement> LocateActionElements()
IPlanElementpublic void SetName(String Name)
IPlanElementName - the namepublic String ToXML() throws ExecutionSerializationException
IPlanElementExecutionSerializationException - A serialization error occurredpublic void Validate()
throws ExecutionValidationException
IPlanElementExecutionValidationException - A validation error occurredpublic void ValidatePreExecution(ExecutionHandle Handle) throws ExecutionValidationException
IPlanElementHandle - the execution handleExecutionValidationException - A validation error occurredpublic IContingencyReaction.ReactionType[] SupportedContingencyTriggers()
IPlanElementpublic boolean SupportsContingencyTriggers()
IPlanElementpublic List<ContingencyTrigger> GetContingencyTriggers()
IPlanElementpublic void SetContingencyResourcePick(ExecutionHandle Handle, String Pick) throws ExecutionRunTimeException
IPlanElementIContingencyReaction.ReactionType#Pick reaction is supportedHandle - the execution handle handlePick - the picked resourceExecutionRunTimeException - A runtime error occurredpublic Set<String> GetModifiedVariableNames()
IPlanElementpublic Set<String> GetNeededVariableNames()
IPlanElementpublic org.slf4j.Logger GetExtenderLogger()
PlanElementBaseGetExtenderLogger in class PlanElementBasepublic void ExecuteExtender(ExecutionHandle Handle) throws ExecutionRunTimeException, ExecutionInternalErrorException, ExecutionCancelException, ExecutionBreakException
PlanElementBaseExecuteExtender in class PlanElementBaseHandle - the execution handleExecutionRunTimeException - A runtime error occurredExecutionInternalErrorException - An internal error occurredExecutionCancelException - The execution was canceledExecutionBreakException - The execution was terminatedCopyright © 2014. All Rights Reserved.