public class DefineAtom extends FSMActivity
Used to store an atom at a target peer. The initiating peer sends a Performative.Request to the target peer with the full storage graph of the atom to define. The target peer writes the atom locally and replies with Performative.Agree.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
TYPENAME |
Constructor and Description |
---|
DefineAtom(HyperGraphPeer thisPeer,
HGHandle atomHandle,
HGPeerIdentity target) |
DefineAtom(HyperGraphPeer thisPeer,
HGHandle atomHandle,
java.lang.Object atom,
HGHandle typeHandle,
HGPeerIdentity target) |
DefineAtom(HyperGraphPeer thisPeer,
java.util.UUID id) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getType()
Return the type name of this activity.
|
void |
initiate()
Empty method - override to implement activity initiation.
|
WorkflowStateConstant |
onAgree(Json msg) |
WorkflowStateConstant |
onRequestDefine(Json msg) |
handleMessage, onPeerFailure, onPeerNotUnderstand
public static final java.lang.String TYPENAME
public DefineAtom(HyperGraphPeer thisPeer, java.util.UUID id)
public DefineAtom(HyperGraphPeer thisPeer, HGHandle atomHandle, HGPeerIdentity target)
public DefineAtom(HyperGraphPeer thisPeer, HGHandle atomHandle, java.lang.Object atom, HGHandle typeHandle, HGPeerIdentity target)
public void initiate()
FSMActivity
Empty method - override to implement activity initiation.
initiate
in class FSMActivity
public WorkflowStateConstant onRequestDefine(Json msg) throws java.lang.Throwable
java.lang.Throwable
public WorkflowStateConstant onAgree(Json msg)
public java.lang.String getType()
Activity
Return the type name of this activity. By the default to fully-qualified class name is returned. This method can be overridden by sub-classes to provide a short and/or more human-readable type name.