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 class
PmessageStateMachine.Context
Class 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.String
sessionId
-
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 void
notifyObservers()
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:StateMachine
Function to perform the duties of an observable n.b. all the callers of this procedure should synchronize on "this"- Overrides:
notifyObservers
in classStateMachine<Pmessage>
-