Class OperationModeStateMachine
java.lang.Object
org.scictrl.csshell.epics.server.application.AbstractApplication
org.scictrl.csshell.epics.server.application.automata.StateMachine
org.scictrl.csshell.epics.server.application.automata.OperationModeStateMachine
- All Implemented Interfaces:
Application
,OnDemandValueProcessor.ValueProvider
A StateMachine, which remembers last not Shutdown operation state and sets it when activated.
- Author:
- igor@scictrl.com
-
Nested Class Summary
Nested classes/interfaces inherited from class org.scictrl.csshell.epics.server.application.automata.StateMachine
StateMachine.State
-
Field Summary
Fields inherited from class org.scictrl.csshell.epics.server.application.automata.StateMachine
ABORT, ACTIVATE, DESCRIPTION, DRYRUN, ENABLED, PREPARE, PROGRESS, STATE, STATE_STRING
Fields inherited from class org.scictrl.csshell.epics.server.application.AbstractApplication
database, DEFAULT_NAME_DELIMITER, dynamicRecordCreator, ERROR_SUM, LINK_ERROR, LINK_ERROR_STRING, links, log, name, NAME_DELIMITER, nameDelimiter, records
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Configures the internals of this application, provides reference to configuration with root inside applications tag.protected void
notifyLinkChange
(String name) This method is called whenever record value changed for any record, which belongs to this application (it was added to the applicationAbstractApplication.addRecord(String, Record)
).void
stateMachineActivate
(boolean dryrun) Activates state machine.Methods inherited from class org.scictrl.csshell.epics.server.application.automata.StateMachine
activate, getProgress, getState, getStatus, getTimeout, isAbortOnFail, isDryRun, isEnabled, isInitializationFailed, notifyRecordChange, notifyRecordWrite, setEnabled, setProgress, setState, setStateInitializationFailed, setStatus, setTimeout, stateMachineAbort, stateMachinePrepare
Methods inherited from class org.scictrl.csshell.epics.server.application.AbstractApplication
addRecord, addRecordOfCommandProcessor, addRecordOfMemoryValueProcessor, addRecordOfMemoryValueProcessor, addRecordOfMemoryValueProcessor, addRecordOfMemoryValueProcessor, addRecordOfMemoryValueProcessor, addRecordOfMemoryValueProcessor, addRecordOfMemoryValueProcessor, addRecordOfMemoryValueProcessor, addRecordOfMemoryValueProcessor, addRecordOfOnDemandProcessor, addRecordOfOnLinkValueProcessor, configure, connectLinks, createNewStore, fullRecordName, getLinks, getName, getNameDelimiter, getNotNull, getRecord, getRecordErrorSum, getRecordLinkError, getRecordNames, getRecords, getStore, getStore, getValue, initialize, isActivated, isDynamicRecordCreator, log4debug, log4error, log4error, log4info, processLinkChange, pushDoneCommandProcessor, reconnectLinks, resetOnDemandProcessor, restore, store, toString, updateErrorSum, updateErrorSum, updateLinkError, updateLinkError
-
Constructor Details
-
OperationModeStateMachine
public OperationModeStateMachine()Constructor for ValueStateMachine.
-
-
Method Details
-
configure
public void configure(String name, org.apache.commons.configuration.HierarchicalConfiguration config) Configures the internals of this application, provides reference to configuration with root inside applications tag. Server structure is not yet initialized, so does not have reference to Database, the Database reference will be available during activate call.- Specified by:
configure
in interfaceApplication
- Overrides:
configure
in classStateMachine
- Parameters:
name
- aString
objectconfig
- configuration with room inside application tag.
-
notifyLinkChange
This method is called whenever record value changed for any record, which belongs to this application (it was added to the applicationAbstractApplication.addRecord(String, Record)
). Implementation class should override this method to intercept the update.- Overrides:
notifyLinkChange
in classAbstractApplication
- Parameters:
name
- the name of record, that triggered change.
-
stateMachineActivate
public void stateMachineActivate(boolean dryrun) Activates state machine. If this state machine is in dry-run mode or dry-run parameter with
true
is called, then this step is activate in dry-run mode.- Overrides:
stateMachineActivate
in classStateMachine
- Parameters:
dryrun
- dry-run mode request
-