JXTA

net.jxta.impl.peergroup
Class DefaultConfigurator

java.lang.Object
  extended by net.jxta.impl.peergroup.NullConfigurator
      extended by net.jxta.impl.peergroup.AutomaticConfigurator
          extended by net.jxta.impl.peergroup.DefaultConfigurator
All Implemented Interfaces:
PlatformConfigurator, Configurator

public class DefaultConfigurator
extends AutomaticConfigurator

This implementation provides the ability to reconfigure a JXTA PlatformConfig via an AWT based dialog. This is the original JXTA configuration mechanism.


Field Summary
 
Fields inherited from class net.jxta.impl.peergroup.NullConfigurator
advertisement, configFile, jxtaHome
 
Constructor Summary
DefaultConfigurator(URI jxtaHome)
          Configures the platform using the specified directory.
 
Method Summary
 PlatformConfig getPlatformConfig()
          Retrieve the associated PlatformConfig and potentially performing any required configuration of the parameters before returning.
 boolean isReconfigure()
          Determine if a forced reconfiguration is set for the next call to PlatformConfigurator.getPlatformConfig().
 void setReconfigure(boolean reconfigure)
          Sets the reconfiguration status to the specified status.
 
Methods inherited from class net.jxta.impl.peergroup.NullConfigurator
getConfigParams, load, load, save, save, setConfigParams, setPlatformConfig
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultConfigurator

public DefaultConfigurator(URI jxtaHome)
                    throws ConfiguratorException
Configures the platform using the specified directory.

Parameters:
jxtaHome - store home URI
Throws:
ConfiguratorException - if a configuration error occurs
Method Detail

isReconfigure

public boolean isReconfigure()
Determine if a forced reconfiguration is set for the next call to PlatformConfigurator.getPlatformConfig().

Kinda hackish in that we don't really do anything if home is not a file.

Specified by:
isReconfigure in interface PlatformConfigurator
Overrides:
isReconfigure in class NullConfigurator
Returns:
Returns true if a forced reconfiguration will occur the next time PlatformConfigurator.getPlatformConfig() is called.

setReconfigure

public void setReconfigure(boolean reconfigure)
Sets the reconfiguration status to the specified status. If true then reconfiguration will be forced the next time the PlatformConfig is retrieved.

Specified by:
setReconfigure in interface PlatformConfigurator
Overrides:
setReconfigure in class NullConfigurator
Parameters:
reconfigure - If true then a forced reconfiguration will occur the next time PlatformConfigurator.getPlatformConfig() is called.

getPlatformConfig

public PlatformConfig getPlatformConfig()
                                 throws ConfiguratorException
Retrieve the associated PlatformConfig and potentially performing any required configuration of the parameters before returning.

Specified by:
getPlatformConfig in interface PlatformConfigurator
Overrides:
getPlatformConfig in class AutomaticConfigurator
Returns:
PlatformConfig
Throws:
ConfiguratorException - If configuration error occurs.

JXSE