|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Represents an authorized lookup peer in the viceroy network. Such a peer can initiate lookups, joins and leaves. The non-authorized version (ViceroyPeer) can not initiate those actions. Note that the lookup operation of a non-authorized ViceroyPeer actually deals with lookup requests, performed by other peers.
| Method Summary | |
void |
addJoinDataListener(JoinDataListener listener)
Adds a new listener. |
void |
addLookupAnswerListener(LookupAnswerListener listener)
Adds a new listener. |
ViceroyPeerManager |
getCommunicationManager()
Gets the communication manager of the peer |
java.util.List |
getConnections()
Gets a set holding both outgoing and ingoing connections of this peer. |
java.util.Set |
getInboundRelatives()
Gets a view of the inbound conections to this peer: children and parents. |
ViceroyPeer |
getLeftChild()
Gets the peer's left child |
ViceroyPeer |
getPredecessor()
Gets the peer's predecessor |
ViceroyPeer |
getRightChild()
Gets the peer's right child |
PeerState |
getState()
Gets the peer's state |
ViceroyPeer |
getSuccessor()
Gets the peer's successor |
ViceroyPeer |
parent()
Gets the peer's parent |
boolean |
removeJoinDataListener(JoinDataListener listener)
Removes the given listener. |
boolean |
removeLookupAnswerListener(LookupAnswerListener listener)
Removes the given listener. |
| Methods inherited from interface viceroy.ViceroyPeer |
changingLevelReceived, discoverReceived, findRelative, getLevel, joinDataReceived, leaveDataReceived, leavingPeerReceived, lookupAnswerReceived, newInboundRelativeReceived, newLeftChildReceived, newParentReceived, newPredecessorReceived, newRightChildReceived, newSuccessorReceived |
| Methods inherited from interface viceroy.LookupPeer |
getAddress, lookup, lookup |
| Methods inherited from interface viceroy.Resource |
hashValue |
| Methods inherited from interface viceroy.AuthorizedLookupPeer |
addResource, containsResource, deleteResource, isResponsibleFor, join, leave |
| Method Detail |
public ViceroyPeerManager getCommunicationManager()
public ViceroyPeer parent()
public ViceroyPeer getLeftChild()
public ViceroyPeer getRightChild()
public ViceroyPeer getSuccessor()
public ViceroyPeer getPredecessor()
public PeerState getState()
public java.util.Set getInboundRelatives()
public java.util.List getConnections()
public void addLookupAnswerListener(LookupAnswerListener listener)
listener - the listener to addviceroy.net.LookupAnswerListener.onLookupAnswerMessage,
viceroy.ViceroyPeer.lookuppublic void addJoinDataListener(JoinDataListener listener)
listener - the listener to addviceroy.net.JoinDataListener.onJoinDataMessage,
viceroy.AuthorizedLookupPeer.joinpublic boolean removeLookupAnswerListener(LookupAnswerListener listener)
listener - the listener to be removed
public boolean removeJoinDataListener(JoinDataListener listener)
listener - the listener to be removed
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||