Package pygar.state
Class PmessageStateMachine
java.lang.Object
java.util.Observable
@ThreadSafe public class PmessageStateMachine extends StateMachine<Pmessage>
This class specializes StateMachine for the Type Pmessage and extends
it to include an associated sessionID, which ID is also
included in the Context of the notifications sent to Observers.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classPmessageStateMachine.ContextClass Context defines the data for observers of this state machine.Nested classes/interfaces inherited from class pygar.state.StateMachine
StateMachine.TransitionPt1, StateMachine.TransitionPt2, StateMachine.TransitionPt3 -
Field Summary
Fields Modifier and Type Field Description java.lang.StringsessionId -
Constructor Summary
Constructors Constructor Description PmessageStateMachine(java.lang.String start, java.lang.String session)StateMachine for type Pmessage and instance of session -
Method Summary
Modifier and Type Method Description voidnotifyObservers()Function to perform the duties of an observable n.b.Methods inherited from class pygar.state.StateMachine
_getStateContext, acceptContextFreeEvent, acceptEvent, addTransition, addTransition, getState, main, notifyObservers, setState
-
Field Details
-
sessionId
public java.lang.String sessionId
-
-
Constructor Details
-
PmessageStateMachine
public PmessageStateMachine(java.lang.String start, java.lang.String session)StateMachine for type Pmessage and instance of session- Parameters:
start- starting state of the machinesession- id of the session
-
-
Method Details
-
notifyObservers
public void notifyObservers()Description copied from class:StateMachineFunction to perform the duties of an observable n.b. all the callers of this procedure should synchronize on "this"- Overrides:
notifyObserversin classStateMachine<Pmessage>
-