AutoConfiguration < Jxta < TWiki

TWiki . Jxta . AutoConfiguration

Autoconfigures big goal would be to remove user's from ever having to deal with the Jxta Configurator again. Here's a requirements list:


Proposed classes so far (I need to modify these to use the existing net.jxta.util.config.* Configurator classes where appropriate):

Configuration - Represents a peer's JXTA configuration, including the peer's machine and network capabilities. Probably a JavaBean that is bound to XML using one of the XML JavaBean databinding APIs.

Autoconfiguration - Probes this peer's machine and network capabilities to automatically set a Configuration object

AutoconfigurationException - Thrown if an exception occurs during autoconfiguration

BootstrapList - Represents a list of public rendezvous and relay servers, and can download these if needed from some address

EndpointSettings - Represents settings for a network endpoint

HttpSettings extends EndpointSettings - Settings to configure this peer to communicate on an HTTP endpoint

TCPSettings extends EndpointSettings - Settings to configure this peer to communicate on a TCP endpoint

ProxySettings - Settings to configure this peer's proxy settings

RendezvousSettings - Settings concerning rendezvous peers, including whether this peer is a rendezvous

RelaySettings - Settings concerning relay peers, including whether this peer is a relay


Entry points into the system based on personnas.

Persona 1: John needs to get a system up and going as quickly as possible. He doesn't even want to know that autoconfiguration is happening and needs no control over it.

His code:

// creates the net peer group.  If no configuration exists, then the JXTA peer
// is configured to use the username "John" and the password "Johnspassword".
// Configuration is done through Autoconfiguration.
PeerGroup netPeerGroup = PeerGroupFactory.newNetPeerGroup("John", "Johnspassword");

Other persona needs to flesh out:


Configuration class:
  String : peerName
  String : peerPassword

  boolean : behindNAT
  boolean : behindFirewall
  boolean : needsProxy

  RendezvousSettings: rendezvousSettings
  RelaySettings : relaySettings
  HttpSettings : httpEndpointSettings
  TCPSettings : tcpEndpointSettings
  ProxySettings : proxySettings
  BootstrapList : bootstrapList
  
  int : upstreamBandwidth - the upstream bandwidth of this peer in bytes per second
  int : downstreamBandwidth - the downstream bandwidth of this peer in bytes per second
  int : availableStorage - the available storage space of this peer in megabytes
  

  save() : void - Saves to the filesystem using the default filename and location
  load() : void - Loads from the filesystem using the default filename and location
  save(OutputStream out) : void - Saves configuration into the given filestream
  load(InputStream in) : void - Loads configuration from the given filestream

  autoconfigure() - Autoconfigures everything; delegates to the Autoconfigure class


Autoconfiguration class:
  Configuration : c

  Autoconfiguration(Configuration c)

  probe() : void - calls each probe/configure method; used to probe everything with one call

  probeUpstreamBandwidth() : void
  probeDownstreamBandwidth() : void
  probeAvailableStorage() : void
  probeBehindNATOrFirewall() : void
  configureRelayAndRendezvousSettings() : void
  configureEndpointSettings() : void

  getConfiguration() : Configuration

-- Main.bradneuberg - 20 Sep 2003

----- Revision r4 - 14 Aug 2004 - 09:41:08 - Main.ramesh_9781