|
JXTA | ||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--net.jxta.instantp2p.Discover
Discovers peers and peergroups.
Constructor Summary | |
Discover(net.jxta.peergroup.PeerGroup group)
Creates a new Discover service. |
Method Summary | |
void |
flush()
Clears the local cache of all stored peers and pee groups. |
java.util.Enumeration |
getAdvertisements()
Searches for service advertisments. |
java.util.Enumeration |
getAdvertisements(java.lang.String peerID)
Returns an Enumeration to discovered service advertisment objects. |
java.util.Enumeration |
getAdvertisements(java.lang.String peerID,
java.lang.String attribute,
java.lang.String value)
Returns an Enumeration to discovered service advertisment objects. |
net.jxta.discovery.Discovery |
getDiscovery()
Returns the instance of the Discovery service we are currently using |
java.util.Enumeration |
getGroups()
Returns an Enumeration to all groups discovered. |
java.util.Enumeration |
getGroups(java.lang.String peerID)
Returns an Enumeration to all groups discovered. |
java.util.Enumeration |
getGroups(java.lang.String peerID,
java.lang.String attribute,
java.lang.String value)
Returns an Enumeration to all groups discovered. |
net.jxta.peergroup.PeerGroup |
getPeerGroup()
Returns the peer group currently in use |
java.util.Enumeration |
getPeers()
Discovers the peers in the current group which are currently in the local cache |
java.util.Enumeration |
getPeers(java.lang.String peerID)
Discovers the peers in the current group. |
java.util.Enumeration |
getPeers(java.lang.String peerID,
java.lang.String attribute,
java.lang.String value)
Discovers the peers in the current group by searching the local cache. |
void |
getRemoteAdvertisements(java.lang.String peerID,
java.lang.String attribute,
java.lang.String value)
Sends a request to remotely find service Advertisments. |
void |
getRemoteGroups(int threshold)
Sends a request to remotely find available peer groups The response from any one peer is limited to threshold. |
void |
getRemoteGroups(java.lang.String peerID,
java.lang.String attribute,
java.lang.String value,
int threshold)
Sends a request to remotely find available peer groups. |
void |
getRemotePeers(int threshold)
Sends a request to remotely find the peer members of the current peer group. |
void |
setPeerGroup(net.jxta.peergroup.PeerGroup group)
Changes the peer group. |
int |
setThreashold(int value)
Sets the threshold for the number of responses expected from any one peer we query. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public Discover(net.jxta.peergroup.PeerGroup group)
group
- the peer group in which context to do all discoveryMethod Detail |
public net.jxta.discovery.Discovery getDiscovery()
public void setPeerGroup(net.jxta.peergroup.PeerGroup group)
group
- the new peer grouppublic net.jxta.peergroup.PeerGroup getPeerGroup()
public int setThreashold(int value)
value
- the new threshold valuepublic java.util.Enumeration getGroups()
public java.util.Enumeration getGroups(java.lang.String peerID)
peerId
- the peerId of the peer to querypublic java.util.Enumeration getGroups(java.lang.String peerID, java.lang.String attribute, java.lang.String value)
peerId
- the peerId of the peer to queryattribute
- attribute name to narrow discovery tovalue
- value of attribute to narrow disocvery topublic java.util.Enumeration getPeers()
public java.util.Enumeration getPeers(java.lang.String peerID)
peerId
- the peerId of the peer to querypublic java.util.Enumeration getPeers(java.lang.String peerID, java.lang.String attribute, java.lang.String value)
peerId
- the peerId of the peer to queryattribute
- attribute name to narrow discovery tovalue
- value of attribute to narrow disocvery topublic java.util.Enumeration getAdvertisements()
public java.util.Enumeration getAdvertisements(java.lang.String peerID)
peerId
- the peerId of the peer to queryattribute
- attribute name to narrow discovery tovalue
- value of attribute to narrow disocvery topublic java.util.Enumeration getAdvertisements(java.lang.String peerID, java.lang.String attribute, java.lang.String value)
peerId
- the peerId of the peer to queryattribute
- attribute name to narrow discovery tovalue
- value of attribute to narrow disocvery topublic void getRemotePeers(int threshold)
threshold
- limit to the response of any one peerpublic void getRemoteGroups(int threshold)
threshold
- limit to the response of any one peerpublic void getRemoteGroups(java.lang.String peerID, java.lang.String attribute, java.lang.String value, int threshold)
peerId
- the peerId of the peer to queryattribute
- attribute name to narrow discovery tovalue
- value of attribute to narrow disocvery tothreshold
- limit to the response of any one peerpublic void getRemoteAdvertisements(java.lang.String peerID, java.lang.String attribute, java.lang.String value)
peerId
- the peerId of the peer to queryattribute
- attribute name to narrow discovery tovalue
- value of attribute to narrow disocvery tothreshold
- limit to the response of any one peerpublic void flush()
|
JXTA | ||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |