Project JXTA

net.jxta.impl.protocol
Class RdvConfigAdv

java.lang.Object
  extended bynet.jxta.document.Advertisement
      extended bynet.jxta.document.ExtendableAdvertisement
          extended bynet.jxta.impl.protocol.RdvConfigAdv

public final class RdvConfigAdv
extends ExtendableAdvertisement

Contains parameters for configuration of the Reference Implemenation Rendezvous Service.



 


Nested Class Summary
static class RdvConfigAdv.Instantiator
          Instantiator for RdvConfigAdv
static class RdvConfigAdv.RendezVousConfiguration
          Enumeration of possible Rendezvous configurations.
 
Constructor Summary
(package private) RdvConfigAdv()
          Use the Instantiator through the factory
(package private) RdvConfigAdv(Element root)
          Use the Instantiator through the factory
 
Method Summary
 void addSeedingURI(String addr)
           
 void addSeedingURI(URI addr)
           
 void addSeedRendezvous(String addr)
           
 void addSeedRendezvous(URI addr)
           
 void clearSeedingURIs()
           
 void clearSeedRendezvous()
           
static String getAdvertisementType()
          {@inheritDoc}
 String getAdvType()
          
 long getAutoRendezvousCheckInterval()
          The interval in relative milliseconds at which this peer will re-evaluate it's state as a rendezvous.
 String getBaseAdvType()
          
 RdvConfigAdv.RendezVousConfiguration getConfiguration()
          True if this peer is to default to act as a rendezvous.
 Document getDocument(MimeMediaType encodeAs)
          
 ID getID()
          
 String[] getIndexFields()
          
 long getLeaseDuration()
          The interval in relative milliseconds of leases offered by rendezvous peers.
 long getLeaseMargin()
          The interval in relative milliseconds of leases offered by rendezvous peers.
 int getMaxClients()
          Return the maximum number of clients.
 int getMaxTTL()
          Returns the maximum TTL for messages propagated by this peer or -1 for the default value.
 int getMinHappyPeerView()
          Returns the minimum peerview size which the rendezvous service will find sufficient.
 boolean getProbeRelays()
          If true then rendezvous clients will probe relay servers for rendezvous.
 URI[] getSeedingURIs()
           
 URI[] getSeedRendezvous()
           
 long getSeedRendezvousConnectDelay()
          The interval in relative milliseconds before which this peer will attempt to contact the the seed peers.
 boolean getUseOnlySeeds()
          If true then this peer will use only seed rendezvous when configured as an edge peer.
protected  boolean handleElement(Element raw)
          
 boolean removeSeedingURI(URI addr)
           
 boolean removeSeedRendezvous(URI addr)
           
 void setAutoRendezvousCheckInterval(long newvalue)
          Sets the interval in relative milliseconds at which this peer will re-evaluate it's state as a rendezvous.
 void setConfiguration(RdvConfigAdv.RendezVousConfiguration newstate)
          Set the default rendezvous state of this peer.
 void setLeaseDuration(long newvalue)
          Sets interval in relative milliseconds of leases to be offered by rendezvous peers.
 void setLeaseMargin(long newvalue)
          Sets interval in relative milliseconds of leases to be offered by rendezvous peers.
 void setMaxClients(int newvalue)
          Sets he maximum number of clients.
 void setMaxTTL(int newvalue)
          Sets the maximum TTL for messages propagated by this peer.
 void setMinHappyPeerView(int newvalue)
          Sets the minimum peerview size which the rendezvous service will find sufficient.
 void setProbeRelays(boolean doProbe)
          Set whether rendezvous clients will probe relay servers for rendezvous.
 void setSeedRendezvousConnectDelay(long newvalue)
          Sets the interval in relative milliseconds before which this peer will attempt to contact the the seed peers.
 void setUseOnlySeeds(boolean onlySeeds)
          Set whether this peer will use only seed rendezvous when configured as an edge peer.
 
Methods inherited from class net.jxta.document.Advertisement
clone, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RdvConfigAdv

RdvConfigAdv()
Use the Instantiator through the factory


RdvConfigAdv

RdvConfigAdv(Element root)
Use the Instantiator through the factory

Method Detail

getAdvertisementType

public static String getAdvertisementType()
{@inheritDoc}


getAdvType

public String getAdvType()


getBaseAdvType

public final String getBaseAdvType()


getID

public ID getID()


handleElement

protected boolean handleElement(Element raw)


getDocument

public Document getDocument(MimeMediaType encodeAs)


getIndexFields

public String[] getIndexFields()


getConfiguration

public RdvConfigAdv.RendezVousConfiguration getConfiguration()
True if this peer is to default to act as a rendezvous.

Returns:
True if this peer is to be a rendezvous

setConfiguration

public void setConfiguration(RdvConfigAdv.RendezVousConfiguration newstate)
Set the default rendezvous state of this peer.

Parameters:
newstate - if true then this peer should default to acting as a rendezvous.

getAutoRendezvousCheckInterval

public long getAutoRendezvousCheckInterval()
The interval in relative milliseconds at which this peer will re-evaluate it's state as a rendezvous. If 0 (zero), the default, then the peer will remain in the state of isRendezvous.

Returns:
The interval in relative milliseconds at which this peer will re-evaluate it's state as a rendezvous. If 0 (zero), the default, then the peer will remain in the state of isRendezvous.

setAutoRendezvousCheckInterval

public void setAutoRendezvousCheckInterval(long newvalue)
Sets the interval in relative milliseconds at which this peer will re-evaluate it's state as a rendezvous. If 0 (zero), the default, then the peer will remain in the state of isRendezvous.

Parameters:
newvalue - The interval in relative milliseconds at which this peer will re-evaluate it's state as a rendezvous. If 0 (zero), the default, then the peer will remain in the state of isRendezvous.

getProbeRelays

public boolean getProbeRelays()
If true then rendezvous clients will probe relay servers for rendezvous.

Returns:
If true then rendezvous clients will probe relay servers for rendezvous.

setProbeRelays

public void setProbeRelays(boolean doProbe)
Set whether rendezvous clients will probe relay servers for rendezvous.

Parameters:
doProbe - If true then rendezvous clients will probe relay servers for rendezvous.

getSeedRendezvous

public URI[] getSeedRendezvous()

addSeedRendezvous

public void addSeedRendezvous(URI addr)

addSeedRendezvous

public void addSeedRendezvous(String addr)

removeSeedRendezvous

public boolean removeSeedRendezvous(URI addr)

clearSeedRendezvous

public void clearSeedRendezvous()

getSeedingURIs

public URI[] getSeedingURIs()

addSeedingURI

public void addSeedingURI(URI addr)

addSeedingURI

public void addSeedingURI(String addr)

removeSeedingURI

public boolean removeSeedingURI(URI addr)

clearSeedingURIs

public void clearSeedingURIs()

getUseOnlySeeds

public boolean getUseOnlySeeds()
If true then this peer will use only seed rendezvous when configured as an edge peer.

Returns:
If true then this peer will use only seed rendezvous when configured as an edge peer.

setUseOnlySeeds

public void setUseOnlySeeds(boolean onlySeeds)
Set whether this peer will use only seed rendezvous when configured as an edge peer.

Parameters:
onlySeeds - If true then this peer will use only seed rendezvous when configured as an edge peer.

getSeedRendezvousConnectDelay

public long getSeedRendezvousConnectDelay()
The interval in relative milliseconds before which this peer will attempt to contact the the seed peers.

Returns:
The interval in relative milliseconds before which this peer will attempt to contact the the seed peers.

setSeedRendezvousConnectDelay

public void setSeedRendezvousConnectDelay(long newvalue)
Sets the interval in relative milliseconds before which this peer will attempt to contact the the seed peers.

Parameters:
newvalue - The interval in relative milliseconds before which this peer will attempt to contact the the seed peers or -1 for the default value.

getLeaseDuration

public long getLeaseDuration()
The interval in relative milliseconds of leases offered by rendezvous peers.

Returns:
The interval in relative milliseconds of leases offered by rendezvous peers.

setLeaseDuration

public void setLeaseDuration(long newvalue)
Sets interval in relative milliseconds of leases to be offered by rendezvous peers.

Parameters:
newvalue - The interval in relative milliseconds of leases to be offered by rendezvous peers or -1 for the default value.

getLeaseMargin

public long getLeaseMargin()
The interval in relative milliseconds of leases offered by rendezvous peers.

Returns:
The interval in relative milliseconds of leases offered by rendezvous peers.

setLeaseMargin

public void setLeaseMargin(long newvalue)
Sets interval in relative milliseconds of leases to be offered by rendezvous peers.

Parameters:
newvalue - The interval in relative milliseconds of leases to be offered by rendezvous peers or -1 for the default value.

getMaxClients

public int getMaxClients()
Return the maximum number of clients.

Returns:
The maximum number of clients.

setMaxClients

public void setMaxClients(int newvalue)
Sets he maximum number of clients.

Parameters:
newvalue - The maximum number of clients or -1 for the default value.

getMaxTTL

public int getMaxTTL()
Returns the maximum TTL for messages propagated by this peer or -1 for the default value.

Returns:
the maximum TTL for messages propagated by this peer or -1 for the default value.

setMaxTTL

public void setMaxTTL(int newvalue)
Sets the maximum TTL for messages propagated by this peer.

Parameters:
newvalue - the maximum TTL for messages propagated by this peer or -1 for the default value.

getMinHappyPeerView

public int getMinHappyPeerView()
Returns the minimum peerview size which the rendezvous service will find sufficient.

Returns:
the minimum peerview size.

setMinHappyPeerView

public void setMinHappyPeerView(int newvalue)
Sets the minimum peerview size which the rendezvous service will find sufficient. If the peerview size is below that threshold, the rendezvous service will more agressively try to discover more rendezvous. If permitted, the local peer may eventualy decide to become a rendezvous in order for the peerview to reach that size.

Parameters:
newvalue - the minimum peerview size, which must be > 0 or -1 for the default value.

JXTA J2SE