org.hypergraphdb.peer.workflow
Class Conversation<StateType>
java.lang.Object
org.hypergraphdb.peer.workflow.AbstractActivity<StateType>
org.hypergraphdb.peer.workflow.Conversation<StateType>
- Type Parameters:
StateType -
- All Implemented Interfaces:
- java.lang.Runnable
- Direct Known Subclasses:
- ProposalConversation
public class Conversation<StateType>
- extends AbstractActivity<StateType>
Superclass for conversation activities. The state transitions in a
conversation are triggered in two ways: by explicitly calling a method that
can "say" something or by receiving a message ("hearing" something)
The conversation will always remember the last message that was said or heard
as this is supposed to carry all the information that is needed about past
messages.
This class allows implementors to declaratively set what type of message to
except when the conversation is in a given state. If a message is received in
a state and there are no defined transitions for that state and the
performative of the message, a "do not understand" reply is sent.
- Author:
- Cipri Costa, Borislav Iordanov
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Conversation
public Conversation(TaskActivity<?> task,
java.lang.Object peer,
StateType start,
StateType end)
handleIncomingMessage
public void handleIncomingMessage(Message msg)
getMessage
public Message getMessage()
getId
public java.util.UUID getId()
setId
public void setId(java.util.UUID id)