Package com.opencloud.sce.fsmtool
Interface InputRegister<InputType extends FSMInput>
-
- Type Parameters:
InputEnum
- The Input enum class generated in the FSM class
- All Superinterfaces:
InputScheduler<InputType>
public interface InputRegister<InputType extends FSMInput> extends InputScheduler<InputType>
InputRegister is used in generated FSM classes to represent the scheduled and execution state of the FSM.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
changesScheduled()
int
encodedSize()
byte[]
encodeMemento()
Encode the input register memento into a new array which is returnedbyte[]
encodeMemento(byte[] encoded)
Encodes the input register into the array passed at offset 0byte[]
encodeMemento(byte[] encoded, int offset)
Encodes the input register into the array passed.Object
getAssociatedObject(InputType input)
Returns the object associated with the inputboolean
isRaised(FSMInputName input)
void
loadMemento(byte[] encodedMemento)
Load the memento from the array from offset 0void
loadMemento(byte[] encodedMemento, int offset)
Load the memento from the array from offset positionvoid
postExecution()
Perform any post execution cycle processing.void
preExecution()
Perform any pre execution cycle processing.void
setInputPersistence(com.opencloud.sce.fsmtool.impl.FSMPersistence inputPersistence)
Setter injector methodvoid
setInputs(FSMInputName[] inputs)
Setter injector methodString
toString()
-
Methods inherited from interface com.opencloud.sce.fsmtool.InputScheduler
clear, clearAll, clearAllEventObjects, clearAssociatedObject, clearDurable, clearDurableEventObjects, clearTransient, clearTransientEventObjects, raise, raise
-
-
-
-
Method Detail
-
setInputs
void setInputs(FSMInputName[] inputs)
Setter injector method- Parameters:
inputs
-
-
setInputPersistence
void setInputPersistence(com.opencloud.sce.fsmtool.impl.FSMPersistence inputPersistence)
Setter injector method- Parameters:
inputPersistence
-
-
preExecution
void preExecution()
Perform any pre execution cycle processing. Used by generated FSM classes.
-
postExecution
void postExecution()
Perform any post execution cycle processing. Used by generated FSM classes.
-
changesScheduled
boolean changesScheduled()
- Returns:
- true if changes to the scheduled view of the InputRegister have been made
-
isRaised
boolean isRaised(FSMInputName input)
- Parameters:
input
-- Returns:
- true if input is raised otherwise false
-
getAssociatedObject
Object getAssociatedObject(InputType input)
Returns the object associated with the input- Parameters:
input
-- Returns:
- object associated with the input
-
loadMemento
void loadMemento(byte[] encodedMemento)
Load the memento from the array from offset 0- Parameters:
encodedMemento
- memento creating usingencodeMemento()
,or {@link #encodeMemento(byte[], int)}
-
loadMemento
void loadMemento(byte[] encodedMemento, int offset)
Load the memento from the array from offset position- Parameters:
encodedMemento
- memento creating usingencodeMemento()
,or {@link #encodeMemento(byte[], int)}
offset
- offset position in the encodedMemento where memento starts
-
encodeMemento
byte[] encodeMemento()
Encode the input register memento into a new array which is returned- Returns:
- memento containing the state of the InputRegister
-
encodedSize
int encodedSize()
- Returns:
- size of the memento
-
encodeMemento
byte[] encodeMemento(byte[] encoded)
Encodes the input register into the array passed at offset 0- Parameters:
encoded
- byte[] to write the memento to- Returns:
- byte[] passed in the encoded argument
-
encodeMemento
byte[] encodeMemento(byte[] encoded, int offset)
Encodes the input register into the array passed.- Parameters:
encoded
- byte[] to write the memento to- Returns:
- byte[] passed in the encoded argument
-
-