uk.ac.ic.doc.rodex.p2p.protocol
Class HEP

java.lang.Object
  extended by uk.ac.ic.doc.rodex.p2p.protocol.HEP

public class HEP
extends java.lang.Object

HEP.java

llo Protocol is used by peers and directory service peers to discover each other on the network. The default implementation is as follows:

HEP is used only at the initial stage of the peer's join process. It is terminated as soon as peer has successfully formed neighbourhood with the d.s.ps

Author:
Duc M Le dmle@doc.ic.ac.uk
Created on April 18, 2006
Department of Computing, Imperial College

Method Summary
static HEP getInstance(AutoMedPeer mainPeer, int channelMode)
           
 void initDirectoryPeerHello()
          Initialise hello process for directory service peer
 void initDirectoryPeerHello(DirectoryServicePeer dsp)
          Initialise hello process for directory service peer.
 void initPeerHello(Peer peer)
          Send hello message to discover other peers.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static HEP getInstance(AutoMedPeer mainPeer,
                              int channelMode)

initPeerHello

public void initPeerHello(Peer peer)
                   throws CommunicationException,
                          AutoMedException
Send hello message to discover other peers. This method is invoked by normal peers.

Throws:
CommunicationException
AutoMedException

initDirectoryPeerHello

public void initDirectoryPeerHello()
                            throws CommunicationException,
                                   AutoMedException
Initialise hello process for directory service peer

Throws:
CommunicationException
AutoMedException

initDirectoryPeerHello

public void initDirectoryPeerHello(DirectoryServicePeer dsp)
                            throws CommunicationException,
                                   AutoMedException
Initialise hello process for directory service peer. This method is used when both the peer and the dsp are running in the same application.

Throws:
CommunicationException
AutoMedException