|
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.rendezvous.rpv.PeerviewSeedingManager
public class PeerviewSeedingManager
A Seeding Manager which uses the peerview advertisement pipes in order to locate seed peers for a given peer group.
Field Summary | |
---|---|
protected PeerGroup |
advGroup
|
protected PipeAdvertisement |
advPipeAdv
|
protected PeerGroup |
group
|
protected static long |
MINIMUM_PEERVIEW_REFRESH_INTERVAL
This is the minimum interval at which we will refresh our "peerview" |
protected String |
name
|
protected long |
nextPeerViewRefresh
The absolute time at which we will refresh our "PeerView" |
protected Set<RouteAdvertisement> |
peerview
Our mock peerview we use to keep responses. |
protected static long |
STANDARD_PEERVIEW_REFRESH_INTERVAL
The standard time interval after which we will refresh our "peerview" |
protected int |
unsuccessfulProbes
The absolute time at which we will refresh our "PeerView" |
Fields inherited from class net.jxta.impl.util.ACLSeedingManager |
---|
acl |
Constructor Summary | |
---|---|
PeerviewSeedingManager(URI aclLocation,
PeerGroup group,
PeerGroup advGroup,
String name)
Creates a new instance of PeerviewSeedingManager |
Method Summary | |
---|---|
void |
addSeed(RouteAdvertisement seed)
Adds a rpv seed |
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(RouteAdvertisement radv)
Returns true if the provided route advertisement is an acceptable
peer as determined by the seeding manager. |
void |
processIncomingMessage(Message msg,
EndpointAddress srcAddr,
EndpointAddress dstAddr)
This method is invoked by the EndpointService for each incoming message which is addressed to this listener. |
protected void |
refreshActiveSeeds()
|
void |
stop()
Stop this seeding manager. |
Methods inherited from class net.jxta.impl.util.ACLSeedingManager |
---|
isAcceptablePeer |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final long MINIMUM_PEERVIEW_REFRESH_INTERVAL
protected static final long STANDARD_PEERVIEW_REFRESH_INTERVAL
protected Set<RouteAdvertisement> peerview
protected long nextPeerViewRefresh
protected int unsuccessfulProbes
protected final PeerGroup advGroup
protected final PeerGroup group
protected final String name
protected final PipeAdvertisement advPipeAdv
Constructor Detail |
---|
public PeerviewSeedingManager(URI aclLocation, PeerGroup group, PeerGroup advGroup, String name)
aclLocation
- ACL urigroup
- the group contextadvGroup
- the advertising groupname
- service nameMethod Detail |
---|
public void stop()
stop
in interface SeedingManager
public void addSeed(RouteAdvertisement seed)
seed
- the seedpublic 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
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
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.protected void refreshActiveSeeds()
public void processIncomingMessage(Message msg, EndpointAddress srcAddr, EndpointAddress dstAddr)
processIncomingMessage
in interface EndpointListener
msg
- Incoming messagesrcAddr
- Endpoint Address of the source of the message.dstAddr
- Endpoint Address of the destination of the message.
|
JXSE | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |