StateType
- public class Conversation<StateType> extends AbstractActivity<StateType>
endState, startState, stateChangedLatch
Constructor and Description |
---|
Conversation(TaskActivity<?> task,
java.lang.Object peer,
StateType start,
StateType end) |
Modifier and Type | Method and Description |
---|---|
protected void |
doRun()
Overriden by implementors to do the actual work
|
java.util.UUID |
getId() |
Json |
getMessage() |
void |
handleIncomingMessage(Json msg) |
protected void |
initiate()
Called by the framework to initiate a new activity.
|
protected void |
registerPerformativeTransition(StateType fromState,
Performative performative,
StateType toState) |
protected void |
say(Json msg)
Say something (i.e.
|
void |
setId(java.util.UUID id) |
afterStateChanged, compareAndSetState, getEndState, getStartState, getState, isStopped, run, setState, setStateListener
public Conversation(TaskActivity<?> task, java.lang.Object peer, StateType start, StateType end)
protected void initiate()
AbstractActivity
Called by the framework to initiate a new activity. This method is only invoked
at the peer initiating the activity. Once an activity has been initiated, its state
changes to start
.
initiate
in class AbstractActivity<StateType>
protected void doRun()
AbstractActivity
doRun
in class AbstractActivity<StateType>
protected void registerPerformativeTransition(StateType fromState, Performative performative, StateType toState)
public void handleIncomingMessage(Json msg)
protected void say(Json msg)
Say something (i.e. send a message) to the peer with which this conversation is taking place.
msg
- public Json getMessage()
public java.util.UUID getId()
public void setId(java.util.UUID id)