|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jlab.coda.afecs.supervisor.CoolServiceExecutor
public class CoolServiceExecutor
JSA: Thomas Jefferson National Accelerator Facility
This software was developed under a United States Government license,
described in the NOTICE file included as part of this distribution.
Copyright (c), 5/12/11
Constructor Summary | |
---|---|
CoolServiceExecutor(SupervisorAgent owner)
Constructor |
Method Summary | |
---|---|
boolean |
checkStatesRequired(ACondition condition)
Gets all described action statements and for every statement extracts the component and required state. |
boolean |
checkStatesRequired(java.lang.String state)
Overloaded method which does the same but uses state name to go over all agents under the control and find the processes required to achieve the state and check the received package text fields with the recorded data in the HashMap |
java.lang.String |
decodeCodaSMServiceName(java.lang.String s)
Decodes coda state machine state transition service names and returns short state name, assuming that service names include coda state names. |
void |
executeActionStatements(java.util.ArrayList<AStatement> al)
Methods executes action statements of a cool service |
int |
executeCondition(ACondition condition)
Executes the conditional statement described in Cool |
boolean |
executeShellScript(AScript scr,
java.lang.String sn,
boolean before)
Method executes shell scripts. |
java.util.ArrayList<java.lang.String> |
getAgentNamesByCoolType(java.lang.String coolType)
Return arrayList of agents names that are described to take part in the COOl conditional statement. |
java.util.ArrayList<java.lang.String> |
getAgentNamesByPriority(int p)
|
java.lang.StringBuffer |
getNotTransitioned(ACondition cond)
Gets all described action statements and for every statement extracts the component and required state. |
java.lang.StringBuffer |
getNotTransitioned(java.lang.String state)
Returns the names of all components that are not transitioned to the required state |
boolean |
isTrueConditionStatement(ACondition condition)
Combines statements based on conditional operators ( && or || for e.g. |
void |
loadStatesServices(AControl c)
Basic differentiation of the supervisor agent. |
void |
sortForReporting()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CoolServiceExecutor(SupervisorAgent owner)
owner
- SupervisorAgent
objectMethod Detail |
---|
public int executeCondition(ACondition condition)
condition
- ACondition
object
public void executeActionStatements(java.util.ArrayList<AStatement> al)
al
- arrayList of AStatement
objectspublic boolean executeShellScript(AScript scr, java.lang.String sn, boolean before)
scr
- AScript
objectsn
- The name of the statebefore
- Boolean value defines if script is running
before (true) or after (false) state transition
public boolean isTrueConditionStatement(ACondition condition)
condition
- ACondition
object reference
public boolean checkStatesRequired(ACondition condition)
condition
- ACondition
object
public boolean checkStatesRequired(java.lang.String state)
state
- the name of the state
public java.lang.StringBuffer getNotTransitioned(java.lang.String state)
state
- required state name
public java.lang.StringBuffer getNotTransitioned(ACondition cond)
cond
- ACondition
object
public java.lang.String decodeCodaSMServiceName(java.lang.String s)
s
- coda state machine service name
public java.util.ArrayList<java.lang.String> getAgentNamesByCoolType(java.lang.String coolType)
coolType
- Cool defines type like "type_EMU" representing specific coda type.
public java.util.ArrayList<java.lang.String> getAgentNamesByPriority(int p)
public void loadStatesServices(AControl c)
CCompiler
c
- AControl object as a result parsing rdf configuration
file for the control.public void sortForReporting()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |