${header}

meteor
Class MeteorPeer

java.lang.Object
  extended byjava.lang.Thread
      extended bymeteor.MeteorPeer
All Implemented Interfaces:
net.jxta.platform.Application, net.jxta.platform.Module, java.lang.Runnable

public class MeteorPeer
extends java.lang.Thread
implements net.jxta.platform.Application

A peer in the Meteor framework for lookup experimentation Each peer can query the network's Distributed Hash table for a keyword or a set of keywords.

Author:
Vincent Matossian December 2003

Field Summary
static java.lang.String refModClassID
           
static java.lang.String refModSpecID
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Fields inherited from interface net.jxta.platform.Module
START_AGAIN_PROGRESS, START_AGAIN_STALLED, START_OK
 
Constructor Summary
MeteorPeer()
          Constructor for MeteorPeer
 
Method Summary
 void find_predecessor(java.math.BigInteger id, int mode, int owner)
          Find the predecessor of an ID, testing stabilization
 void get(java.lang.String key)
          Retrieve an entry from the DHT
 void init(net.jxta.peergroup.PeerGroup group, net.jxta.id.ID assignedID, net.jxta.document.Advertisement implAdv)
          Invoked when application is initialized in the Loader class
 void loadCan()
          Load the CAN service
 void loadChord()
          Load the Chord service
 void loadDHTService()
          Starts the DHT service
 void lookup(java.math.BigInteger id)
          Lookup finds the sucessor of id
 void put(java.lang.String key, java.lang.String value)
          Populate the Distributed Hashtable
 void registerListener(DHTListener c)
          Registering the Shell commands as listeners to results received by the Lookup SErvice
 void removeListener(DHTListener c)
          Remove a DHTListener
 void sendMessage(java.math.BigInteger id)
          A test for sending messages between nodes which now enables querying a node to retrieve its fingertable and print it locally
 void sendMessage(java.math.BigInteger id, int times)
           
 void setDHT(java.lang.String algo)
          Set the DHT Algorithm
 java.lang.String showTable()
          Displays the Finger Table
 int startApp(java.lang.String[] args)
          Invoked on StartApp in Loader class
 void stopApp()
          Stopping the application
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, run, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

refModClassID

public static final java.lang.String refModClassID
See Also:
Constant Field Values

refModSpecID

public static final java.lang.String refModSpecID
Constructor Detail

MeteorPeer

public MeteorPeer()
Constructor for MeteorPeer

Method Detail

init

public void init(net.jxta.peergroup.PeerGroup group,
                 net.jxta.id.ID assignedID,
                 net.jxta.document.Advertisement implAdv)
          throws net.jxta.exception.PeerGroupException
Invoked when application is initialized in the Loader class

Specified by:
init in interface net.jxta.platform.Module
Parameters:
group - the PeerGroup
assignedID - the assigned Identifier for this module
implAdv - the implementation advertisement
Throws:
net.jxta.exception.PeerGroupException

startApp

public int startApp(java.lang.String[] args)
Invoked on StartApp in Loader class

Specified by:
startApp in interface net.jxta.platform.Module

setDHT

public void setDHT(java.lang.String algo)
Set the DHT Algorithm


loadDHTService

public void loadDHTService()
Starts the DHT service


loadChord

public void loadChord()
Load the Chord service


loadCan

public void loadCan()
Load the CAN service


lookup

public void lookup(java.math.BigInteger id)
Lookup finds the sucessor of id


sendMessage

public void sendMessage(java.math.BigInteger id)
A test for sending messages between nodes which now enables querying a node to retrieve its fingertable and print it locally


sendMessage

public void sendMessage(java.math.BigInteger id,
                        int times)

find_predecessor

public void find_predecessor(java.math.BigInteger id,
                             int mode,
                             int owner)
Find the predecessor of an ID, testing stabilization


put

public void put(java.lang.String key,
                java.lang.String value)
Populate the Distributed Hashtable


get

public void get(java.lang.String key)
Retrieve an entry from the DHT


registerListener

public void registerListener(DHTListener c)
Registering the Shell commands as listeners to results received by the Lookup SErvice


removeListener

public void removeListener(DHTListener c)
Remove a DHTListener


stopApp

public void stopApp()
Stopping the application

Specified by:
stopApp in interface net.jxta.platform.Module

showTable

public java.lang.String showTable()
Displays the Finger Table


${header}