org.hypergraphdb.peer.replication
Class PublishInterestsTask

java.lang.Object
  extended by org.hypergraphdb.peer.workflow.Activity
      extended by org.hypergraphdb.peer.replication.PublishInterestsTask

public class PublishInterestsTask
extends Activity

Author:
ciprian.costa A task that is used by a peer to publish its interests in the entire network or by the peer interface to respond to queries about a peers interests.

Constructor Summary
PublishInterestsTask(HyperGraphPeer thisPeer, HGAtomPredicate pred)
          Constructor called by current peer to publish his interests
PublishInterestsTask(HyperGraphPeer thisPeer, java.util.UUID id)
          Constructor called by peer interface -someone is requesting us to publish our interests
 
Method Summary
 void handleMessage(Message msg)
           Handle an incoming that was identified as belonging to this activity.
 void initiate()
           Called by the framework to initiate a new activity.
 
Methods inherited from class org.hypergraphdb.peer.workflow.Activity
getFuture, getId, getState, getType, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PublishInterestsTask

public PublishInterestsTask(HyperGraphPeer thisPeer,
                            HGAtomPredicate pred)
Constructor called by current peer to publish his interests

Parameters:
peerInterface -
pred -

PublishInterestsTask

public PublishInterestsTask(HyperGraphPeer thisPeer,
                            java.util.UUID id)
Constructor called by peer interface -someone is requesting us to publish our interests

Parameters:
peerInterface -
peer -
msg -
Method Detail

initiate

public void initiate()
Description copied from class: Activity

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 Started.

Specified by:
initiate in class Activity

handleMessage

public void handleMessage(Message msg)
Description copied from class: Activity

Handle an incoming that was identified as belonging to this activity.

Specified by:
handleMessage in class Activity
Parameters:
msg - The full message.