|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.ac.ic.doc.automed.p2p.communication.AbstractRequestListener
uk.ac.ic.doc.automed.p2p.AutoMedPeer
uk.ac.ic.doc.rodex.p2p.Peer
uk.ac.ic.doc.rodex.p2p.DirectoryServicePeer
public class DirectoryServicePeer
DirectoryServicePeer.java
Represents directory service peer on the network. It is basically an AutoMedPeer
with capabilities of an P2PDirectory
object.
As such this class relies on P2PDirectory
to serve network requests but
but uses its own handling routine.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class uk.ac.ic.doc.automed.p2p.AutoMedPeer |
---|
AutoMedPeer.PeerProcessDescription |
Field Summary |
---|
Fields inherited from class uk.ac.ic.doc.automed.p2p.AutoMedPeer |
---|
config, peerAddress, role, ROLE_AUTOMED_PEER, ROLE_DSP, ROLE_PEER, thePeer |
Constructor Summary | |
---|---|
protected |
DirectoryServicePeer(java.lang.String name,
PeerStateHandler stateHandler)
Creates a new instance of DirectoryServicePeer |
Method Summary | |
---|---|
void |
addEventListener(java.util.EventListener listener)
Register an EventListener object |
void |
addRequestListener(RequestListener listener)
Register a RequestListener object to client requests |
P2PDirectory |
getDirectory()
Return directory service object |
static DirectoryServicePeer |
getInstance(java.lang.String name,
PeerStateHandler stateHandler)
Returns a single instance of the dsp |
void |
initDirectoryRepository()
This method allows a peer to indirectly re-initialises the directory repository used by the peer's P2PDirectory instance |
void |
initHelloProtocol()
Intialise the hello protocol for directory service |
void |
initSICP()
Initialises SICP protocol |
Methods inherited from class uk.ac.ic.doc.rodex.p2p.Peer |
---|
finalize, get, get, get, getIDString, getLastKeyString, getLastRouteString, getMyKeys, getMyValues, getMyValues, getOverlayController, getQEP, getQueryAggregator, getRoutingTableString, getSelfIDAddressPair, initOverlay, initOverlay, joinOverlay, newPeer, newPeerProcess, outputQuery, put, put, requestAbstractPathToSource, requestQuery |
Methods inherited from class uk.ac.ic.doc.automed.p2p.communication.AbstractRequestListener |
---|
getRequestMessage, getResponseData, getType, handleRequest, handleRequest, handleRequest, handleUDPRequest, handleUDPRequest, handleUDPRequest |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected DirectoryServicePeer(java.lang.String name, PeerStateHandler stateHandler) throws StateChangedException, AutoMedException
StateChangedException
AutoMedException
Method Detail |
---|
public static DirectoryServicePeer getInstance(java.lang.String name, PeerStateHandler stateHandler) throws StateChangedException, AutoMedException
StateChangedException
AutoMedException
public void initDirectoryRepository() throws AutoMedException
P2PDirectory
instance
initDirectoryRepository
in class AutoMedPeer
AutoMedException
public P2PDirectory getDirectory()
getDirectory
in class AutoMedPeer
public void addRequestListener(RequestListener listener)
RequestListener
object to client requests
addRequestListener
in class AutoMedPeer
public void addEventListener(java.util.EventListener listener)
EventListener
object
public void initHelloProtocol() throws CommunicationException, AutoMedException
initHelloProtocol
in class Peer
CommunicationException
AutoMedException
public void initSICP()
initSICP
in class Peer
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |