|
JXTA | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.jxta.impl.util.ACLSeedingManager
net.jxta.impl.util.RdvAdvSeedingManager
net.jxta.impl.util.URISeedingManager
public class URISeedingManager
A seeding manager that supports both explicit seed peers and loading of seeds from seeding resources.
Field Summary |
---|
Fields inherited from class net.jxta.impl.util.RdvAdvSeedingManager |
---|
discoveredRoutes, group, MIN_REFRESH_INTERVAL, nextRemoteDiscovery, serviceName |
Fields inherited from class net.jxta.impl.util.ACLSeedingManager |
---|
acl |
Constructor Summary | |
---|---|
URISeedingManager(URI aclLocation,
boolean allowOnlySeeds,
PeerGroup group,
String serviceName)
Get an instance of URISeedingManager. |
Method Summary | |
---|---|
void |
addSeed(RouteAdvertisement seed)
Adds the specified URI to the list of permanent seeds. |
void |
addSeed(URI seed)
Adds the specified URI to the list of permanent seeds. |
void |
addSeedingURI(URI seeding)
Adds the specified URI to the list of seeding URIs. |
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. |
boolean |
isAcceptablePeer(PeerAdvertisement peeradv)
Returns true if the provided peer advertisement is an acceptable
peer as determined by the seeding manager. |
boolean |
isAcceptablePeer(RouteAdvertisement radv)
Returns true if the provided route advertisement is an acceptable
peer as determined by the seeding manager. |
(package private) static RouteAdvertisement[] |
loadSeeds(URI seedingURI)
Load a list of seed peer RouteAdvertisements from the specified URI. |
void |
stop()
Stop this seeding manager. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public URISeedingManager(URI aclLocation, boolean allowOnlySeeds, PeerGroup group, String serviceName)
aclLocation
- The location of the ACL file or null
if no
ACL file should be used.allowOnlySeeds
- If true
then the only peers which are part
of the seed peer set will beMethod Detail |
---|
public void stop()
stop
in interface SeedingManager
stop
in class RdvAdvSeedingManager
public void addSeed(URI seed)
allowOnlySeeds
is in effect, this seed may now be used, as if it
was part of the initial configuration.
seed
- The URI of the seed peer.public void addSeed(RouteAdvertisement seed)
allowOnlySeeds
is in effect, this seed may now be used, as if it
was part of the initial configuration.
seed
- The RouteAdvertisement of the seed peer.public void addSeedingURI(URI seeding)
seeding
- The URI of the seeding list.public URI[] getActiveSeedURIs()
URI
of the endpoint addresses of the active seed
peers. The URI
s are returned in the order which the consumer
should attempt to contact the seed peers.
Using the endpoint address URI
s 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.
getActiveSeedURIs
in interface SeedingManager
getActiveSeedURIs
in class RdvAdvSeedingManager
URI
s of the active seed peers in the order
in which the seed peers should be contacted.public RouteAdvertisement[] getActiveSeedRoutes()
PeerID
if it is not
known.
getActiveSeedRoutes
in interface SeedingManager
getActiveSeedRoutes
in class RdvAdvSeedingManager
public boolean isAcceptablePeer(PeerAdvertisement peeradv)
true
if the provided peer advertisement is an acceptable
peer as determined by the seeding manager.
Performs it's determination based solely on the list of peers in
the access list.
isAcceptablePeer
in interface SeedingManager
isAcceptablePeer
in class ACLSeedingManager
peeradv
- The PeerAdvertisement
of the peer being tested.public boolean isAcceptablePeer(RouteAdvertisement radv)
true
if the provided route advertisement is an acceptable
peer as determined by the seeding manager.
Performs it's determination based solely on the list of peers in
the access list.
isAcceptablePeer
in interface SeedingManager
isAcceptablePeer
in class ACLSeedingManager
radv
- The RouteAdvertisement
of the peer being tested.static RouteAdvertisement[] loadSeeds(URI seedingURI) throws IOException
RouteAdvertisement
s.RouteAdvertisement
s. The seed advertisements may be ordered
or unordered.
seedingURI
- The intended source of the RouteAdvertisement
s.
RouteAdvertisement
s.
IOException
- Thrown for errors encountered loading the seed
RouteAdvertisements.
|
JXSE | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |