Name

Package net.jxta.discovery

Synopsis

The discovery service defined in this package is used by JXTA peers to discover resources within the JXTA community. Peers use the discovery service to discover any published advertisement, including advertisements of peergroups, pipes, and network services. The discovery service uses the Peer Discovery Protocol (PDP) to find these resources. Depending on the configuration of the peer, the discovery service will use broadcast or multicast messages on the local network to locate the desired advertisement; it may also directly contact preconfigured rendezvous peers to find distant resources.

Applications that create new advertisements use the discovery service to publish those advertisements, which makes them available to other peers within the peergroup.

Discovery is a core service of JXTA; most JXTA peergroups will implement a discovery service. At a logical level, there’s a bootstrapping issue here, since the discovery protocol is used to locate the initial NetPeerGroup. At a programming level, however, this isn’t a concern: initializing the NetPeerGroup will automatically discover that group without using any of the APIs in this package. You use the APIs in this package only after you’ve joined the NetPeerGroup: obtain the discovery service from the NetPeerGroup, use that service to locate any desired resources, and utilize those resources.

Most peers will share the implementation of the default discovery service used by the NetPeerGroup, ...

Get JXTA in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.