Name
PeerInfoService
Synopsis
The peer information service is used to
find peer information advertisements for peers that belong to a
specific peergroup. Instances of this class are returned by the
peergroup’s getPeerInfoService( )
method.
Discovery of peer information
advertisements is asynchronous. You call the
getRemotePeerInfo( )
method to find information
about particular peers. That information can be retrieved later by
calling the getPeerInfo( )
method (which will
retrieve it from the local cache held by the application), or you can
register a peer information listener to be notified when the
advertisement is found.
To find a specific peer, pass its
peer ID to one of the getter methods. To find all peers, pass
null
to one of the getter methods.
public interface PeerInfoService extends net.jxta.service.Service { // Event Registration Methods (by event name) public abstract void addPeerInfoListener(PeerInfoListener listener); // Public Instance Methods public abstract void flushAdvertisements(net.jxta.id.ID id) throws IOException; public abstract java.util.Enumeration getLocalPeerInfo(net.jxta.id.ID peer) throws IOException; public abstract net.jxta.protocol.PeerInfoResponseMessage getPeerInfoService(); public abstract void getRemotePeerInfo(net.jxta.id.ID peer, PeerInfoListener listener); public abstract boolean removePeerInfoListener(PeerInfoListener listener); // Deprecated Public Methods public abstract int getRemotePeerInfo(net.jxta.id.ID peer); // # }
Returned By
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.