Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

net.jxta.ext.config
Class Configurator  view Configurator download Configurator.java

java.lang.Object
  extended bynet.jxta.ext.config.Configurator
All Implemented Interfaces:
net.jxta.peergroup.Configurator, java.io.Externalizable, net.jxta.impl.peergroup.PlatformConfigurator, java.io.Serializable
Direct Known Subclasses:
TrivialConfigurator

public class Configurator
extends java.lang.Object
implements java.io.Externalizable, net.jxta.impl.peergroup.PlatformConfigurator

A JXTA configurator.

Configurator serves primarily as a JXTA property sheet and implements very little attribute association logic beyond that of what is required to perform integrity validation and address expansion. To the latter, All addresses are of the form URI. Addresses that do not specify a scheme will default accordingly. Further, RendezVous and Relay addresses that do not specify a host wil be replaced with the corresponding boostrap results. If a scheme is specified only bootstrap results with matching schemes will be maintained. All other addresses that do not specify a host will, in turn, be replaced with the local host. All fields have backing defaults enabling one to seed a configuration with a partial yet valid resource file.

Configurator will parse an existing PlatformConfig if one exists in the specified JXTA home 55 directory. If this is not the case, a Configuration 55 file will be parsed it one such file exists. Lastly, if neither of the above are resolvable the Default profile will be used to seed the newly created instance.

Resulting PlatformConfig instances can then be retrieved or persisted upon passing the integrity validation checks.

Version:
$Id: Configurator.java,v 1.188 2005/03/09 04:09:50 gonzo Exp $

Field Summary
private static java.lang.String COLON
           
private  java.util.Map customParams
           
private  java.lang.String descriptor
           
private static java.lang.String EMPTY_STRING
           
private  int endpointQueueSize
           
private static java.io.File HOME
           
private  boolean isProxyEnabled
           
private  boolean isRelaysDiscovery
           
private  boolean isSecurity
           
private static org.apache.log4j.Logger LOG
           
private static long MAX_WAIT
           
private static int MILLISECONDS_PER_SECOND
           
private static char NULL_CHAR
           
private  java.util.List optimizers
           
private  java.lang.String password
           
private  java.lang.String peerDescription
           
private  net.jxta.peer.PeerID peerId
           
private  java.lang.String peerName
           
private  java.net.URI peerProxy
           
private  java.lang.String principal
           
private  net.jxta.impl.protocol.PSEConfigAdv pse
           
private  net.jxta.impl.protocol.RdvConfigAdv rdvConfig
           
private  java.net.URI reflectionBootstrap
           
private  net.jxta.impl.protocol.RelayConfigAdv relayConfig
           
private  java.net.URI relaysBootstrap
           
private  java.net.URI rendezVousBootstrap
           
private  java.net.URI rootCertificateAddress
           
private  Trace trace
           
private  java.util.List transports
           
 
Constructor Summary
Configurator()
          Deprecated. It's recommended to use the four params constructor
Configurator(net.jxta.impl.protocol.PlatformConfig config)
          Constructor for the Configurator object.

If the provided PlatformConfig is null a default PlatformConfig will be used in it's place.
Configurator(Profile profile)
          Constructor for the Configurator object.

If the provided Profile is null the default profile will be used in it's place.
Configurator(java.lang.String name, java.lang.String password)
          Constructor for the Configurator object.
Configurator(java.lang.String name, java.lang.String principal, java.lang.String password)
          Deprecated. It's recommended to use the four param constructor
Configurator(java.lang.String name, java.lang.String description, java.lang.String principal, java.lang.String password)
          Constructor for the Configurator object.

If a Platform configuration file 55 is found residing in the JXTA home 55 directory it is used to seed this instance.
 
Method Summary
 void addOptimizer(Optimizer optimizer)
           
 void addOptimizers(java.util.List optimizers)
           
 void addRelay(java.net.URI relay)
          Adds a Relay address.

Relays addresses with unspecified host information will be, upon PlatformConfig generation, be replaced with the associated bootstrap results.
 void addRelays(java.util.List relays)
          Adds Relay addresses.

Relays addresses with unspecified host information will be, upon PlatformConfig generation, be replaced with the associated bootstrap results.
 void addRendezVous(java.util.List seed)
          Adds RendezVous addresses.

RendezVous addresses with unspecified host information will be, upon PlatformConfig generation, be replaced with the associated bootstrap results.
 void addRendezVous(java.net.URI seed)
          Adds a RendezVous address.

RendezVous addresses with unspecified host information will be, upon PlatformConfig generation, be replaced with the associated bootstrap results.
 void addTransport(Transport transport)
          Adds a feature to the Transport attribute of the Configurator object
 void addTransports(java.util.List transports)
          Adds a feature to the Transports attribute of the Configurator object
 void clearOptimizers()
           
 void clearRelays()
          Remove all Relay addresses.
 void clearRendezVous()
          Remove all RendezVous addresses.
 void clearTransports()
          Description of the Method
private  net.jxta.impl.protocol.PlatformConfig constructPlatformConfig()
          Construct a PlatformConfig.
 java.util.List fetchBootstrapAddresses(java.net.URI u)
          Retrieve the specified bootstrap file.
 net.jxta.protocol.ConfigParams getConfigParams()
          Retrieve the parameters associcated with this configuration from the default location.
 java.lang.String getDescription()
          Gets the Peer description.
 java.lang.String getDescriptor()
          Gets the descriptor.
 int getEndpointOutgoingQueueSize()
          Gets the Endpoint queue size measured in messages
static java.io.File getHome()
          Gets base JXTA home.
 java.net.URI getJXTAHome()
           
protected  java.lang.String getLocalHost()
          Gets the localHost attribute of the Configurator object
 java.lang.String getName()
          Gets the Peer name.
 java.util.Iterator getOptimizers()
           
protected  java.lang.String getPassword()
          Gets the password.
 net.jxta.peer.PeerID getPeerId()
          Gets the PeerID.
 java.net.URI getPeerProxyAddress()
          Gets the proxy used for configuration.
 net.jxta.impl.protocol.PlatformConfig getPlatformConfig()
          Gets the PlatformConfig that is comprised of the constituent properties.
 java.lang.String getPrincipal()
          Gets the principal.
 java.net.URI getReflectionBootstrapAddress()
          Deprecated. moved to RelayOptimizer property
 long getRelayIncomingLease()
          Gets the Relay incoming lease measured in milliseconds.
 int getRelayIncomingMaximum()
          Gets the Relay incoming maximum.
 long getRelayOutgoingLease()
          Gets the Relay outgoing lease measured in milliseconds.
 int getRelayOutgoingMaximum()
          Gets the Relay outgoing maximum.
 int getRelayQueueSize()
          Gets the Relay queue size measured in messages.
 java.util.List getRelays()
          Gets the Relay addresses.
 java.net.URI getRelaysBootstrapAddress()
          Gets the Relay bootstrap address.
 boolean getRelaysDiscovery()
          Gets the Relay discovery enabler.
 java.util.List getRendezVous()
          Gets the RendezVous addresses.
 long getRendezVousAutoStart()
          Gets the RendezVous AutoStart delay in milliseconds.
 java.net.URI getRendezVousBootstrapAddress()
          Gets the RendezVous bootstrap address.
 java.security.cert.Certificate getRootCertificate()
          Gets the root certificate.
 java.net.URI getRootCertificateAddress()
          Gets the Root Certificate address.
 java.lang.String getRootCertificateBase64()
          Gets the root certificate Base64 encoded.
 Trace getTrace()
          Gets the Trace.
 java.util.List getTransports()
          Gets the transports attribute of the Configurator object
 boolean isProxy()
          Gets the proxy service enabler.
 boolean isReconfigure()
          gets the reconfigure attribute of the Configurator object
 boolean isRelay()
          Gets the Relay enabler.
 boolean isRelayIncoming()
          Gets the Relay incoming enabler.
 boolean isRelayOutgoing()
          Gets the Relay outgoing enabler.
 boolean isRelaysDiscovery()
          Gets the Relay discovery enabler.
 boolean isRendezVous()
          Gets the RendezVous enabler.
 boolean isRendezVousAutoStart()
          Get RendezVousService AutoStart status.
 boolean isRendezVousDiscovery()
          Gets the RendezVous discovery enabler.
 boolean isSecurity()
          Gets the security enabler.
 net.jxta.protocol.ConfigParams load()
          null
 net.jxta.impl.protocol.PlatformConfig load(java.io.File loadFile)
          null
private  java.net.URI makeAddress(java.lang.String protocol, java.lang.String addr, int port)
           
private  void normalize()
          Normalize constructs.
private  void optimize()
           
private  java.util.List orderAddresses(java.util.List a)
          Optimally order the addresses dependent upon the configuration current.
private  void process(net.jxta.impl.protocol.PlatformConfig platformConfig)
          Process PlatformConfig.
private  void process(Profile profile)
          Description of the Method
private  void process(Profile profile, boolean overlay)
          Process profile.
 void readExternal(java.io.ObjectInput in)
          This method restores an object's state by reading in the instance data for the object from the passed in stream.
 java.lang.Class removeOptimizer(Optimizer optimizer)
           
 java.net.URI removeRelay(java.net.URI relay)
          Remove the Relay address.
 java.net.URI removeRendezVous(java.net.URI rendezVous)
          Remove the RendezVous address.
 Transport removeTransport(Transport transport)
          Description of the Method
 boolean save()
          Perisist the resultant PlatformConfig.

The PlatformConfig will be saved in the Platform configuration file under the JXTA home directory 55 .
 boolean save(java.io.File platformConfig)
          Persist the resultant PlatformConfig in the specified file.
 void setConfigParams(net.jxta.protocol.ConfigParams pc)
          Sets the platformConfig attribute of the Configurator object
static void setConfigurator(java.lang.Class configurator)
           
private  void setCustomParams(net.jxta.impl.protocol.PlatformConfig pc)
          Set custom service params from a given PlatformConfig
 void setDescription(java.lang.String description)
          Sets the Peer description.
 void setDescriptor(java.lang.String descriptor)
          Sets the descriptor
private  void setEndpoint(net.jxta.protocol.ConfigParams pc)
          Sets the Endpoint construct.
 void setEndpointOutgoingQueueSize(int size)
          Sets the Endpoint queue size measured in messages
static void setHome(java.io.File home)
          Sets the home attribute of the Configurator class
private  void setHttp(net.jxta.protocol.ConfigParams pc)
          Sets the Http construct.
 void setName(java.lang.String name)
          Sets the Peer name.
 void setPeerId(net.jxta.peer.PeerID peerId)
          Sets the PeerID.

Unspecified PeerIDs will be generated by the Platform.
 void setPeerProxyAddress(java.net.URI peerProxyAddress)
          Sets the proxy used for configuration.
 void setPlatformConfig(net.jxta.impl.protocol.PlatformConfig pc)
          Sets the platformConfig attribute of the Configurator object
 void setProxy(boolean isEnabled)
          Sets the proxy service enabler.
private  void setProxy(net.jxta.protocol.ConfigParams pc)
          Sets the Proxy construct.
private  void setPse(net.jxta.protocol.ConfigParams pc)
          Sets the PSEConfigAdv construct.
private  void setRdv(net.jxta.protocol.ConfigParams pc)
          Sets the RendezVous construct.
 void setReconfigure(boolean reconfigure)
          Sets the reconfigure attribute of the Configurator object
 void setReflectionBootstrapAddress(java.net.URI reflectionBootstrapAddress)
          Deprecated. moved to RelayOptimizer property
 void setRelay(boolean isEnabled)
          Sets the Relay enabler.
private  void setRelay(net.jxta.protocol.ConfigParams pc)
          Sets the Relay construct.
 void setRelay(java.net.URI relay)
          Sets the Relay address.

Relays addresses with unspecified host information will be, upon PlatformConfig generation, be replaced with the associated bootstrap results.
 void setRelayDiscovery(boolean isEnabled)
          Sets the Relay discovery enabler.
 void setRelayIncoming(boolean isEnabled)
          Sets the Relay enabler enabling inbound connections.
 void setRelayIncomingLease(long incomingLease)
          Sets the Relay incoming lease measured in milliseconds.
 void setRelayIncomingMaximum(int maximumIncoming)
          Sets the Relay incoming maximum.
 void setRelayOutgoing(boolean isEnabled)
          Sets the Relay outgoing enabler enabling outbound connnections.
 void setRelayOutgoingLease(long outgoingLease)
          Sets the Relay outgoing lease measured in milliseconds.
 void setRelayOutgoingMaximum(int maximumOutgoing)
          Sets the Relay outgoing maximum.
 void setRelayQueueSize(int queueSize)
          Sets the Relay queue size measured in messages.
 void setRelays(java.util.List relays)
          Sets the Relay addresses.

Relays addresses with unspecified host information will be, upon PlatformConfig generation, be replaced with the associated bootstrap results.
 void setRelaysBootstrapAddress(java.net.URI relaysBootstrapAddress)
          Sets the Relay bootstrap address that will be used to resolve all addresses that do not specify a host.
 void setRelaysDiscovery(boolean isEnabled)
          Sets the Relays discovery enabler.
 void setRendezVous(boolean isEnabled)
          Sets the RendezVous enabler.
 void setRendezVous(java.util.List seed)
          Sets the RendezVous addresses.

RendezVous addresses with unspecified host information will be, upon PlatformConfig generation, be replaced with the associated bootstrap results.
 void setRendezVous(java.net.URI rendezVous)
          Sets the RendezVous addresses.

RendezVous addresses with unspecified host information will be, upon PlatformConfig generation, be replaced with the associated bootstrap results.
 void setRendezVousAutoStart(boolean isAutoStart)
          Deprecated. controlled via setting autostart interval.
 void setRendezVousAutoStart(long autoStart)
          Sets the RendezVous AutoStart delay measured in milliseconds.
 void setRendezVousBootstrapAddress(java.net.URI rendezVousBootstrapAddress)
          Sets the RendezVous bootstrap address that will be used to resolve all addresses that do not specify a host.
 void setRendezVousDiscovery(boolean discover)
          Sets the RendezVous discovery enabler.
 void setRootCertificate(java.security.cert.Certificate rootCertificate)
          Sets the root certificate
 void setRootCertificateAddress(java.net.URI rootCertificateAddress)
          Sets the Root Certificate address.
 void setRootCertificateBase64(java.lang.String rootCertificate)
          Sets the root certificate
 void setSecurity(boolean isEnabled)
          Sets the security enabler.
 void setSecurity(java.lang.String principal, java.lang.String password)
          Sets the principal and associated password.
private  void setTcp(net.jxta.protocol.ConfigParams pc)
          Sets the Tcp construct.
 void setTrace(Trace trace)
          Sets the Trace level.
 void setTransport(Transport transport)
          Sets the transport attribute of the Configurator object
 void setTransports(java.util.List transports)
          Sets the transports attribute of the Configurator object
static java.net.URI toAllAddresses(java.net.URI base)
          Method to transpose URI into one that represents all local interfaces.
protected  boolean transportsContainsScheme(java.lang.String scheme)
          Description of the Method
private  void validate()
          Validate the configuration current state.
 void writeExternal(java.io.ObjectOutput out)
          This method is responsible for writing the instance data of an object to the passed in stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COLON

private static final java.lang.String COLON
See Also:
Constant Field Values

EMPTY_STRING

private static final java.lang.String EMPTY_STRING
See Also:
Constant Field Values

MILLISECONDS_PER_SECOND

private static final int MILLISECONDS_PER_SECOND
See Also:
Constant Field Values

NULL_CHAR

private static final char NULL_CHAR
See Also:
Constant Field Values

MAX_WAIT

private static final long MAX_WAIT
See Also:
Constant Field Values

LOG

private static final org.apache.log4j.Logger LOG

HOME

private static java.io.File HOME

descriptor

private java.lang.String descriptor

peerName

private java.lang.String peerName

peerDescription

private java.lang.String peerDescription

trace

private Trace trace

peerId

private net.jxta.peer.PeerID peerId

isSecurity

private boolean isSecurity

principal

private java.lang.String principal

password

private java.lang.String password

rootCertificateAddress

private java.net.URI rootCertificateAddress

pse

private net.jxta.impl.protocol.PSEConfigAdv pse

peerProxy

private java.net.URI peerProxy

rendezVousBootstrap

private java.net.URI rendezVousBootstrap

relaysBootstrap

private java.net.URI relaysBootstrap

isRelaysDiscovery

private boolean isRelaysDiscovery

reflectionBootstrap

private java.net.URI reflectionBootstrap

transports

private java.util.List transports

relayConfig

private net.jxta.impl.protocol.RelayConfigAdv relayConfig

endpointQueueSize

private int endpointQueueSize

isProxyEnabled

private boolean isProxyEnabled

rdvConfig

private net.jxta.impl.protocol.RdvConfigAdv rdvConfig

optimizers

private java.util.List optimizers

customParams

private java.util.Map customParams
Constructor Detail

Configurator

public Configurator()
Deprecated. It's recommended to use the four params constructor

Constructor for the Configurator object.


Configurator

public Configurator(java.lang.String name,
                    java.lang.String password)
Constructor for the Configurator object.


Configurator

public Configurator(java.lang.String name,
                    java.lang.String principal,
                    java.lang.String password)
Deprecated. It's recommended to use the four param constructor

Constructor for the Configurator object.


Configurator

public Configurator(java.lang.String name,
                    java.lang.String description,
                    java.lang.String principal,
                    java.lang.String password)
Constructor for the Configurator object.

If a Platform configuration file 55 is found residing in the JXTA home 55 directory it is used to seed this instance. If this fails and a Env#PROFILEProfile is found residing in the JXTA home 55 directory, it is, in turn, used to seed this instance. In the event neither of these configuration files are found the defaults are configured accordingly.


Configurator

public Configurator(Profile profile)
Constructor for the Configurator object.

If the provided Profile is null the default profile will be used in it's place.


Configurator

public Configurator(net.jxta.impl.protocol.PlatformConfig config)
Constructor for the Configurator object.

If the provided PlatformConfig is null a default PlatformConfig will be used in it's place.

Method Detail

getHome

public static java.io.File getHome()
Gets base JXTA home.


setHome

public static void setHome(java.io.File home)
Sets the home attribute of the Configurator class


setConfigurator

public static void setConfigurator(java.lang.Class configurator)

toAllAddresses

public static java.net.URI toAllAddresses(java.net.URI base)
Method to transpose URI into one that represents all local interfaces.


load

public net.jxta.protocol.ConfigParams load()
                                    throws net.jxta.exception.ConfiguratorException
null

Specified by:
load in interface net.jxta.peergroup.Configurator

load

public net.jxta.impl.protocol.PlatformConfig load(java.io.File loadFile)
                                           throws net.jxta.exception.ConfiguratorException
null

Specified by:
load in interface net.jxta.impl.peergroup.PlatformConfigurator

getJXTAHome

public java.net.URI getJXTAHome()
Specified by:
getJXTAHome in interface net.jxta.impl.peergroup.PlatformConfigurator

getDescriptor

public java.lang.String getDescriptor()
Gets the descriptor.


setDescriptor

public void setDescriptor(java.lang.String descriptor)
Sets the descriptor


getName

public java.lang.String getName()
Gets the Peer name.


setName

public void setName(java.lang.String name)
Sets the Peer name.


getDescription

public java.lang.String getDescription()
Gets the Peer description.


setDescription

public void setDescription(java.lang.String description)
Sets the Peer description.


getTrace

public Trace getTrace()
Gets the Trace.


setTrace

public void setTrace(Trace trace)
Sets the Trace level.


getPeerId

public net.jxta.peer.PeerID getPeerId()
Gets the PeerID.


setPeerId

public void setPeerId(net.jxta.peer.PeerID peerId)
Sets the PeerID.

Unspecified PeerIDs will be generated by the Platform.


isRendezVous

public boolean isRendezVous()
Gets the RendezVous enabler.


setRendezVous

public void setRendezVous(boolean isEnabled)
Sets the RendezVous enabler.


getRendezVous

public java.util.List getRendezVous()
Gets the RendezVous addresses.


setRendezVous

public void setRendezVous(java.net.URI rendezVous)
                   throws net.jxta.exception.ConfiguratorException
Sets the RendezVous addresses.

RendezVous addresses with unspecified host information will be, upon PlatformConfig generation, be replaced with the associated bootstrap results. Further, if the scheme is provided.then only matching boostrap results will be retained.


setRendezVous

public void setRendezVous(java.util.List seed)
                   throws net.jxta.exception.ConfiguratorException
Sets the RendezVous addresses.

RendezVous addresses with unspecified host information will be, upon PlatformConfig generation, be replaced with the associated bootstrap results. Further, if the scheme is provided.then only matching boostrap results will be retained.


addRendezVous

public void addRendezVous(java.net.URI seed)
                   throws net.jxta.exception.ConfiguratorException
Adds a RendezVous address.

RendezVous addresses with unspecified host information will be, upon PlatformConfig generation, be replaced with the associated bootstrap results. Further, if the scheme is provided.then only matching boostrap results will be retained.


addRendezVous

public void addRendezVous(java.util.List seed)
                   throws net.jxta.exception.ConfiguratorException
Adds RendezVous addresses.

RendezVous addresses with unspecified host information will be, upon PlatformConfig generation, be replaced with the associated bootstrap results. Further, if the scheme is provided.then only matching boostrap results will be retained.


removeRendezVous

public java.net.URI removeRendezVous(java.net.URI rendezVous)
Remove the RendezVous address.


clearRendezVous

public void clearRendezVous()
Remove all RendezVous addresses.


isRendezVousAutoStart

public boolean isRendezVousAutoStart()
Get RendezVousService AutoStart status.


setRendezVousAutoStart

public void setRendezVousAutoStart(boolean isAutoStart)
Deprecated. controlled via setting autostart interval.

Set RendezVousService AutoStart status enabling the resulting Peer to become a RendezVous if the ascribed RendezVous are not accessible.


getRendezVousAutoStart

public long getRendezVousAutoStart()
Gets the RendezVous AutoStart delay in milliseconds.


setRendezVousAutoStart

public void setRendezVousAutoStart(long autoStart)
Sets the RendezVous AutoStart delay measured in milliseconds.


isRelay

public boolean isRelay()
Gets the Relay enabler.


setRelay

public void setRelay(boolean isEnabled)
Sets the Relay enabler.


getRelays

public java.util.List getRelays()
Gets the Relay addresses.


setRelay

public void setRelay(java.net.URI relay)
              throws net.jxta.exception.ConfiguratorException
Sets the Relay address.

Relays addresses with unspecified host information will be, upon PlatformConfig generation, be replaced with the associated bootstrap results. Further if the scheme is provided.then only matching boostrap results will be retained.


setRelays

public void setRelays(java.util.List relays)
               throws net.jxta.exception.ConfiguratorException
Sets the Relay addresses.

Relays addresses with unspecified host information will be, upon PlatformConfig generation, be replaced with the associated bootstrap results. Further, if the scheme is provided then only matching boostrap results will be retained.


addRelay

public void addRelay(java.net.URI relay)
              throws net.jxta.exception.ConfiguratorException
Adds a Relay address.

Relays addresses with unspecified host information will be, upon PlatformConfig generation, be replaced with the associated bootstrap results. Further if the scheme is provided then only matching boostrap results will be retained.


addRelays

public void addRelays(java.util.List relays)
               throws net.jxta.exception.ConfiguratorException
Adds Relay addresses.

Relays addresses with unspecified host information will be, upon PlatformConfig generation, be replaced with the associated bootstrap results. Further if the scheme is provided then only matching boostrap results will be retained.


removeRelay

public java.net.URI removeRelay(java.net.URI relay)
Remove the Relay address.


clearRelays

public void clearRelays()
Remove all Relay addresses.


isRelayIncoming

public boolean isRelayIncoming()
Gets the Relay incoming enabler.


setRelayIncoming

public void setRelayIncoming(boolean isEnabled)
Sets the Relay enabler enabling inbound connections.


getRelayIncomingMaximum

public int getRelayIncomingMaximum()
Gets the Relay incoming maximum.


setRelayIncomingMaximum

public void setRelayIncomingMaximum(int maximumIncoming)
Sets the Relay incoming maximum.


getRelayIncomingLease

public long getRelayIncomingLease()
Gets the Relay incoming lease measured in milliseconds.


setRelayIncomingLease

public void setRelayIncomingLease(long incomingLease)
Sets the Relay incoming lease measured in milliseconds.


isRelayOutgoing

public boolean isRelayOutgoing()
Gets the Relay outgoing enabler.


setRelayOutgoing

public void setRelayOutgoing(boolean isEnabled)
Sets the Relay outgoing enabler enabling outbound connnections.


getRelayOutgoingMaximum

public int getRelayOutgoingMaximum()
Gets the Relay outgoing maximum.


setRelayOutgoingMaximum

public void setRelayOutgoingMaximum(int maximumOutgoing)
Sets the Relay outgoing maximum.


getRelayOutgoingLease

public long getRelayOutgoingLease()
Gets the Relay outgoing lease measured in milliseconds.


setRelayOutgoingLease

public void setRelayOutgoingLease(long outgoingLease)
Sets the Relay outgoing lease measured in milliseconds.


getRelayQueueSize

public int getRelayQueueSize()
Gets the Relay queue size measured in messages.


setRelayQueueSize

public void setRelayQueueSize(int queueSize)
Sets the Relay queue size measured in messages.


getTransports

public java.util.List getTransports()
Gets the transports attribute of the Configurator object


setTransport

public void setTransport(Transport transport)
Sets the transport attribute of the Configurator object


setTransports

public void setTransports(java.util.List transports)
Sets the transports attribute of the Configurator object


addTransport

public void addTransport(Transport transport)
Adds a feature to the Transport attribute of the Configurator object


addTransports

public void addTransports(java.util.List transports)
Adds a feature to the Transports attribute of the Configurator object


removeTransport

public Transport removeTransport(Transport transport)
Description of the Method


clearTransports

public void clearTransports()
Description of the Method


getPrincipal

public java.lang.String getPrincipal()
Gets the principal.


isSecurity

public boolean isSecurity()
Gets the security enabler.


setSecurity

public void setSecurity(boolean isEnabled)
Sets the security enabler.


setSecurity

public void setSecurity(java.lang.String principal,
                        java.lang.String password)
Sets the principal and associated password.


getRootCertificateAddress

public java.net.URI getRootCertificateAddress()
Gets the Root Certificate address.


setRootCertificateAddress

public void setRootCertificateAddress(java.net.URI rootCertificateAddress)
Sets the Root Certificate address.


getRootCertificate

public java.security.cert.Certificate getRootCertificate()
Gets the root certificate.


getRootCertificateBase64

public java.lang.String getRootCertificateBase64()
Gets the root certificate Base64 encoded.


setRootCertificate

public void setRootCertificate(java.security.cert.Certificate rootCertificate)
Sets the root certificate


setRootCertificateBase64

public void setRootCertificateBase64(java.lang.String rootCertificate)
Sets the root certificate


getPeerProxyAddress

public java.net.URI getPeerProxyAddress()
Gets the proxy used for configuration.


setPeerProxyAddress

public void setPeerProxyAddress(java.net.URI peerProxyAddress)
                         throws net.jxta.exception.ConfiguratorException
Sets the proxy used for configuration. If the address scheme is not specified the appropriate value will be assigned.


getEndpointOutgoingQueueSize

public int getEndpointOutgoingQueueSize()
Gets the Endpoint queue size measured in messages


setEndpointOutgoingQueueSize

public void setEndpointOutgoingQueueSize(int size)
Sets the Endpoint queue size measured in messages


isProxy

public boolean isProxy()
Gets the proxy service enabler.


setProxy

public void setProxy(boolean isEnabled)
Sets the proxy service enabler.


getRendezVousBootstrapAddress

public java.net.URI getRendezVousBootstrapAddress()
Gets the RendezVous bootstrap address.


setRendezVousBootstrapAddress

public void setRendezVousBootstrapAddress(java.net.URI rendezVousBootstrapAddress)
                                   throws net.jxta.exception.ConfiguratorException
Sets the RendezVous bootstrap address that will be used to resolve all addresses that do not specify a host.


isRendezVousDiscovery

public boolean isRendezVousDiscovery()
Gets the RendezVous discovery enabler.


setRendezVousDiscovery

public void setRendezVousDiscovery(boolean discover)
Sets the RendezVous discovery enabler.


getRelaysBootstrapAddress

public java.net.URI getRelaysBootstrapAddress()
Gets the Relay bootstrap address.


setRelaysBootstrapAddress

public void setRelaysBootstrapAddress(java.net.URI relaysBootstrapAddress)
                               throws net.jxta.exception.ConfiguratorException
Sets the Relay bootstrap address that will be used to resolve all addresses that do not specify a host.


isRelaysDiscovery

public boolean isRelaysDiscovery()
Gets the Relay discovery enabler.


setRelayDiscovery

public void setRelayDiscovery(boolean isEnabled)
Sets the Relay discovery enabler.


getRelaysDiscovery

public boolean getRelaysDiscovery()
Gets the Relay discovery enabler.


setRelaysDiscovery

public void setRelaysDiscovery(boolean isEnabled)
Sets the Relays discovery enabler.


getReflectionBootstrapAddress

public java.net.URI getReflectionBootstrapAddress()
Deprecated. moved to RelayOptimizer property

Gets the Reflection bootstrap address.


setReflectionBootstrapAddress

public void setReflectionBootstrapAddress(java.net.URI reflectionBootstrapAddress)
                                   throws net.jxta.exception.ConfiguratorException
Deprecated. moved to RelayOptimizer property

Sets the Reflection bootstrap address that is used during the optimization process.


getPlatformConfig

public net.jxta.impl.protocol.PlatformConfig getPlatformConfig()
                                                        throws net.jxta.exception.ConfiguratorException
Gets the PlatformConfig that is comprised of the constituent properties. Contingencies include the following integrity validation checks:

  • specified Peer name
  • valid principal and password
  • at least one transport is enabled
  • transport host and port is specified
  • valid multicast port and size
  • for Relays at least one transport is specified
  • valid Http proxy, if requiired

Specified by:
getPlatformConfig in interface net.jxta.impl.peergroup.PlatformConfigurator

getConfigParams

public net.jxta.protocol.ConfigParams getConfigParams()
                                               throws net.jxta.exception.ConfiguratorException
Description copied from interface: net.jxta.peergroup.Configurator
Retrieve the parameters associcated with this configuration from the default location. If necessary the parameters will be created or an opportunity to adjust them will be provided.

Specified by:
getConfigParams in interface net.jxta.peergroup.Configurator

setPlatformConfig

public void setPlatformConfig(net.jxta.impl.protocol.PlatformConfig pc)
Sets the platformConfig attribute of the Configurator object

Specified by:
setPlatformConfig in interface net.jxta.impl.peergroup.PlatformConfigurator

setConfigParams

public void setConfigParams(net.jxta.protocol.ConfigParams pc)
Sets the platformConfig attribute of the Configurator object

Specified by:
setConfigParams in interface net.jxta.peergroup.Configurator

fetchBootstrapAddresses

public java.util.List fetchBootstrapAddresses(java.net.URI u)
                                       throws java.io.IOException
Retrieve the specified bootstrap file.


getOptimizers

public java.util.Iterator getOptimizers()

addOptimizer

public void addOptimizer(Optimizer optimizer)

addOptimizers

public void addOptimizers(java.util.List optimizers)

removeOptimizer

public java.lang.Class removeOptimizer(Optimizer optimizer)

clearOptimizers

public void clearOptimizers()

setReconfigure

public void setReconfigure(boolean reconfigure)
Sets the reconfigure attribute of the Configurator object

Specified by:
setReconfigure in interface net.jxta.impl.peergroup.PlatformConfigurator

isReconfigure

public boolean isReconfigure()
gets the reconfigure attribute of the Configurator object

Specified by:
isReconfigure in interface net.jxta.impl.peergroup.PlatformConfigurator

save

public boolean save()
             throws net.jxta.exception.ConfiguratorException
Perisist the resultant PlatformConfig.

The PlatformConfig will be saved in the Platform configuration file under the JXTA home directory 55 .

Specified by:
save in interface net.jxta.peergroup.Configurator

save

public boolean save(java.io.File platformConfig)
             throws net.jxta.exception.ConfiguratorException
Persist the resultant PlatformConfig in the specified file.

Specified by:
save in interface net.jxta.impl.peergroup.PlatformConfigurator

writeExternal

public void writeExternal(java.io.ObjectOutput out)
Description copied from interface: java.io.Externalizable
This method is responsible for writing the instance data of an object to the passed in stream. Note that this stream is not a subclass o