|
Project JXTA | ||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--net.jxta.impl.discovery.DiscoveryInterface
DiscoveryInterface provides a pure interface object that permits interaction with the actual DiscoveryService implementation without giving access to the real object.
Fields inherited from interface net.jxta.discovery.Discovery |
ADV,
DEFAULT_EXPIRATION,
DEFAULT_LIFETIME,
GROUP,
PEER |
Constructor Summary | |
DiscoveryInterface(DiscoveryService theRealThing)
Only authorized constructor |
Method Summary | |
void |
addDiscoveryListener(net.jxta.discovery.DiscoveryListener listener)
Add a discovery listener |
void |
flushAdvertisements(java.lang.String id,
int type)
flush cached peer Advertisements. |
net.jxta.document.Advertisement |
getAdvertisement()
Returns the advertisment for that service. |
net.jxta.service.Service |
getInterface()
returns an interface object that permits to use this service without having access to the real object. |
java.util.Enumeration |
getLocalAdvertisements(int type,
java.lang.String attribute,
java.lang.String value)
Retrieve Stored Advertisements |
int |
getRemoteAdvertisements(java.lang.String peer,
int type,
java.lang.String attribute,
java.lang.String value,
int threshold)
Discover peers within a region set by the endpoint |
void |
init(net.jxta.peergroup.PeerGroup pg,
net.jxta.document.Advertisement a)
Initialize the application FIXME: This is meaningless for the interface object; it is there only to satisfy the requirements of the interface that we implement. |
void |
publish(net.jxta.document.Advertisement adv,
int type)
Publish an advertisement same as above, provided as a convenience |
void |
publish(net.jxta.document.Advertisement adv,
int type,
long lifetime,
long lifetimeForOthers)
Publish an advertisement that will expire after a certain time. |
void |
remotePublish(net.jxta.document.Advertisement adv,
int type)
|
void |
remotePublish(net.jxta.document.Advertisement adv,
int type,
long lifetime)
Remote Publish an advertisement |
boolean |
removeDiscoveryListener(net.jxta.discovery.DiscoveryListener listener)
remove a discovery listener |
int |
startApp(java.lang.String[] arg)
This is here for temporary class hierarchy reasons. |
void |
stopApp()
This is here for temporary class hierarchy reasons. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public DiscoveryInterface(DiscoveryService theRealThing)
Method Detail |
public net.jxta.service.Service getInterface()
public net.jxta.document.Advertisement getAdvertisement()
public void init(net.jxta.peergroup.PeerGroup pg, net.jxta.document.Advertisement a)
group
- PeerGroup this application is started frompublic int startApp(java.lang.String[] arg)
arg
- A table of strings arguments.public void stopApp()
public int getRemoteAdvertisements(java.lang.String peer, int type, java.lang.String attribute, java.lang.String value, int threshold)
address
- Address of a peer, or portal to connect to, if address is null
then getPeerAdv "discover" in the region of the groupnet.jxta.endpoint.Address
public java.util.Enumeration getLocalAdvertisements(int type, java.lang.String attribute, java.lang.String value) throws java.io.IOException
public void flushAdvertisements(java.lang.String id, int type) throws java.io.IOException
public void publish(net.jxta.document.Advertisement adv, int type) throws java.io.IOException
doc
- StructuredDocument to publishpublic void publish(net.jxta.document.Advertisement adv, int type, long lifetime, long lifetimeForOthers) throws java.io.IOException
advertisement
- the advertisementtype
- PEER, GROUP, ADVlifetime
- the amount of time this advertisement will live
in my cachelifetimeForOthers
- the amount of time this advertisement
will live in other people's caches.public void remotePublish(net.jxta.document.Advertisement adv, int type)
public void remotePublish(net.jxta.document.Advertisement adv, int type, long lifetime)
advertisement
- publish an adverisement within this grouptype
- PEER, GROUP, ADVlifetime
- the amount of time to advise other nodes to hold
this advertisement in their caches.public void addDiscoveryListener(net.jxta.discovery.DiscoveryListener listener)
DiscoveryListener
- listener to receive discovery eventspublic boolean removeDiscoveryListener(net.jxta.discovery.DiscoveryListener listener)
DiscoveryListener
- listener to remove
|
Project JXTA | ||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |