JXTA

net.jxta.impl.util
Class RdvAdvSeedingManager

java.lang.Object
  extended by net.jxta.impl.util.ACLSeedingManager
      extended by net.jxta.impl.util.RdvAdvSeedingManager
All Implemented Interfaces:
SeedingManager
Direct Known Subclasses:
URISeedingManager

public class RdvAdvSeedingManager
extends ACLSeedingManager

Adds the ability to discover RdvAdvs via Discovery.


Field Summary
(package private)  List<RouteAdvertisement> discoveredRoutes
          The Route Advertisements we have discovered.
(package private)  PeerGroup group
          Group who's services we will utilize.
(package private) static long MIN_REFRESH_INTERVAL
          The minimum frequence at which we will update our seed lists.
(package private)  long nextRemoteDiscovery
          The absolute time in milliseconds at which we may sen our next remote discovery.
(package private)  String serviceName
          The identifier which we use to distinguish our RdvAdvertisements.
 
Fields inherited from class net.jxta.impl.util.ACLSeedingManager
acl
 
Constructor Summary
RdvAdvSeedingManager(URI aclLocation, PeerGroup group, String serviceName)
          Creates a new instance of RdvAdvSeedingManager
 
Method Summary
 RouteAdvertisement[] getActiveSeedRoutes()
          Returns the route advertisements of the active seed peers.
 URI[] getActiveSeedURIs()
          Returns the URI of the endpoint addresses of the active seed peers.
 void stop()
          Stop this seeding manager.
 
Methods inherited from class net.jxta.impl.util.ACLSeedingManager
isAcceptablePeer, isAcceptablePeer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MIN_REFRESH_INTERVAL

static final long MIN_REFRESH_INTERVAL
The minimum frequence at which we will update our seed lists.

See Also:
Constant Field Values

group

final PeerGroup group
Group who's services we will utilize.


serviceName

final String serviceName
The identifier which we use to distinguish our RdvAdvertisements.


nextRemoteDiscovery

long nextRemoteDiscovery
The absolute time in milliseconds at which we may sen our next remote discovery.


discoveredRoutes

final List<RouteAdvertisement> discoveredRoutes
The Route Advertisements we have discovered.

Constructor Detail

RdvAdvSeedingManager

public RdvAdvSeedingManager(URI aclLocation,
                            PeerGroup group,
                            String serviceName)
Creates a new instance of RdvAdvSeedingManager

Parameters:
aclLocation - The location of the ACL file or null if no ACL file should be used.
Method Detail

stop

public void stop()
Stop this seeding manager.


getActiveSeedURIs

public URI[] getActiveSeedURIs()
Returns the URI of the endpoint addresses of the active seed peers. The URIs are returned in the order which the consumer should attempt to contact the seed peers.

Using the endpoint address URIs is less optimal than using the route advertisements as there is no association between the potentially multiple message transport addresses referring to a single peer.

Returns:
The URIs of the active seed peers in the order in which the seed peers should be contacted.

getActiveSeedRoutes

public RouteAdvertisement[] getActiveSeedRoutes()
Returns the route advertisements of the active seed peers. The route advertisements are returned in the order which the consumer should attempt to contact the seed peers. In some cases the returned route advertisements may omit the destination PeerID if it is not known.

Returns:
The route advertisements of the active seed peers in the order in which the seed peers should be contacted.

JXSE