Project JXTA

net.jxta.impl.protocol
Class RelayConfigAdv

java.lang.Object
  extended by net.jxta.document.Advertisement
      extended by net.jxta.document.ExtendableAdvertisement
          extended by net.jxta.impl.protocol.RelayConfigAdv

public final class RelayConfigAdv
extends ExtendableAdvertisement

Contains parameters for configuration of the Reference Implemenation Relay Service.



 


Nested Class Summary
static class RelayConfigAdv.Instantiator
          Instantiator for RelayConfigAdv
 
Constructor Summary
RelayConfigAdv()
          Use the Instantiator through the factory
RelayConfigAdv(Element root)
          Use the Instantiator through the factory
 
Method Summary
 void addSeedingURI(String addr)
           
 void addSeedingURI(URI addr)
           
 void addSeedRelay(EndpointAddress addr)
           
 void addSeedRelay(String addr)
           
 void clearSeedingURIs()
           
 void clearSeedRelays()
           
static String getAdvertisementType()
          
 String getAdvType()
          
 long getAnnounceInterval()
          The interval in relative milliseconds at which relay server will announce its presence.
 String getBaseAdvType()
          
 long getClientLeaseDuration()
          The interval in relative milliseconds of leases accepted by clients.
 int getClientMessageQueueSize()
          Return the client message queue length size.
 Document getDocument(MimeMediaType encodeAs)
          
 ID getID()
          
 String[] getIndexFields()
          
 int getMaxClients()
          Return the maximum number of relay clients.
 int getMaxRelays()
          Return the maximum number of relay clients.
 long getMessengerPollInterval()
          The interval in relative milliseconds of at which clients will poll for messengers
 URI[] getSeedingURIs()
           
 EndpointAddress[] getSeedRelays()
           
 long getServerLeaseDuration()
          The interval in relative milliseconds of leases offered by servers.
 long getStallTimeout()
          The interval in relative milliseconds after which a client is assumed to no longer be connected if it fails to request messages.
 boolean getUseOnlySeeds()
          If true then this peer will use only seed rendezvous when configured as an edge peer.
protected  boolean handleElement(Element raw)
          
 boolean isClientEnabled()
          If true then this peer will act as a relay client.
 boolean isServerEnabled()
          If true then this peer will act as a relay server.
 boolean removeSeedingURI(URI addr)
           
 boolean removeSeedRelay(EndpointAddress addr)
           
 void setAnnounceInterval(long newvalue)
          Sets interval in relative milliseconds at which relay server will announce its presence or -1 for default value.
 void setClientEnabled(boolean enabled)
          If true then this peer will act as a relay client.
 void setClientLeaseDuration(long newvalue)
          Sets interval in relative milliseconds of leases accepted by clients.
 void setClientMessageQueueSize(int newvalue)
          Sets the client message queue length size.
 void setMaxClients(int newvalue)
          Sets he maximum number of relay clients.
 void setMaxRelays(int newvalue)
          Sets the maximum number of relay clients.
 void setMessengerPollInterval(long newvalue)
          Sets interval in relative milliseconds of at which clients will poll for messengers.
 void setServerEnabled(boolean enabled)
          If true then this peer will act as a relay server.
 void setServerLeaseDuration(long newvalue)
          Sets interval in relative milliseconds of leases offered by servers.
 void setStallTimeout(long newvalue)
          Sets interval in relative milliseconds after which a client is assumed to no longer be connected if it fails to request messages.
 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

RelayConfigAdv

RelayConfigAdv()
Use the Instantiator through the factory


RelayConfigAdv

RelayConfigAdv(Element root)
Use the Instantiator through the factory

Method Detail

getAdvertisementType

public static String getAdvertisementType()


getAdvType

public String getAdvType()

Overrides:
getAdvType in class Advertisement

getBaseAdvType

public final String getBaseAdvType()

Specified by:
getBaseAdvType in class ExtendableAdvertisement

getID

public ID getID()

Specified by:
getID in class Advertisement

handleElement

protected boolean handleElement(Element raw)

Overrides:
handleElement in class ExtendableAdvertisement

getDocument

public Document getDocument(MimeMediaType encodeAs)

Overrides:
getDocument in class ExtendableAdvertisement

getIndexFields

public String[] getIndexFields()

Specified by:
getIndexFields in class Advertisement

isClientEnabled

public boolean isClientEnabled()
If true then this peer will act as a relay client.

Returns:
If true then this peer will act as a relay client.

setClientEnabled

public void setClientEnabled(boolean enabled)
If true then this peer will act as a relay client.

Parameters:
enabled - If true then this peer will act as a relay client.

getMaxRelays

public int getMaxRelays()
Return the maximum number of relay clients.

Returns:
The maximum number of relay clients or -1 for default value.

setMaxRelays

public void setMaxRelays(int newvalue)
Sets the maximum number of relay clients.

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

getClientLeaseDuration

public long getClientLeaseDuration()
The interval in relative milliseconds of leases accepted by clients.

Returns:
The interval in relative milliseconds of leases accepted by clients or -1 for default value.

setClientLeaseDuration

public void setClientLeaseDuration(long newvalue)
Sets interval in relative milliseconds of leases accepted by clients.

Parameters:
newvalue - The interval in relative milliseconds of leases accepted by clients or -1 for default value.

getMessengerPollInterval

public long getMessengerPollInterval()
The interval in relative milliseconds of at which clients will poll for messengers

Returns:
The interval in relative milliseconds of at which clients will poll for messengers or -1 for default value.

setMessengerPollInterval

public void setMessengerPollInterval(long newvalue)
Sets interval in relative milliseconds of at which clients will poll for messengers.

Parameters:
newvalue - The interval in relative milliseconds of at which clients will poll for messengers or -1 for default value.

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:
doProbe - If true then this peer will use only seed rendezvous when configured as an edge peer.

getSeedRelays

public EndpointAddress[] getSeedRelays()

addSeedRelay

public void addSeedRelay(EndpointAddress addr)

addSeedRelay

public void addSeedRelay(String addr)

removeSeedRelay

public boolean removeSeedRelay(EndpointAddress addr)

clearSeedRelays

public void clearSeedRelays()

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()

isServerEnabled

public boolean isServerEnabled()
If true then this peer will act as a relay server.

Returns:
If true then this peer will act as a relay server.

setServerEnabled

public void setServerEnabled(boolean enabled)
If true then this peer will act as a relay server.

Parameters:
enabled - If true then this peer will act as a relay server.

getMaxClients

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

Returns:
The maximum number of relay clients or -1 for default value.

setMaxClients

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

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

getClientMessageQueueSize

public int getClientMessageQueueSize()
Return the client message queue length size.

Returns:
The client message queue length size or -1 for default value.

setClientMessageQueueSize

public void setClientMessageQueueSize(int newvalue)
Sets the client message queue length size.

Parameters:
newvalue - The client message queue length size or -1 for default value.

getServerLeaseDuration

public long getServerLeaseDuration()
The interval in relative milliseconds of leases offered by servers.

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

setServerLeaseDuration

public void setServerLeaseDuration(long newvalue)
Sets interval in relative milliseconds of leases offered by servers.

Parameters:
newvalue - The interval in relative milliseconds of leases offered by servers or -1 for default value.

getStallTimeout

public long getStallTimeout()
The interval in relative milliseconds after which a client is assumed to no longer be connected if it fails to request messages.

Returns:
The interval in relative milliseconds after which a client is assumed to no longer be connected if it fails to request messages or -1 for default value.

setStallTimeout

public void setStallTimeout(long newvalue)
Sets interval in relative milliseconds after which a client is assumed to no longer be connected if it fails to request messages.

Parameters:
newvalue - The interval in relative milliseconds after which a client is assumed to no longer be connected if it fails to request messages or -1 for default value.

getAnnounceInterval

public long getAnnounceInterval()
The interval in relative milliseconds at which relay server will announce its presence.

Returns:
The interval in relative milliseconds at which relay server will broadcast its presence or -1 for default value.

setAnnounceInterval

public void setAnnounceInterval(long newvalue)
Sets interval in relative milliseconds at which relay server will announce its presence or -1 for default value.

Parameters:
newvalue - The interval in relative milliseconds at which relay server will announce its presence.

JXTA J2SE