uk.ac.ic.doc.rodex.p2p.protocol
Class HEP
java.lang.Object
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:
- As a peer is connected to the network, it starts advertising its identity via
unicast OR multicast communication channel
- Directory service peer listens on the specified channel for hello messages. When it
has received a message from a peer, it decodes message content and validates this against
its own configuration. If they match, d.s.p records information of this new peer and sends
an acknowledgement back to the peer confirming this.
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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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