net.jxta.impl.peergroup
Class DefaultConfigurator
java.lang.Object
net.jxta.impl.peergroup.NullConfigurator
net.jxta.impl.peergroup.AutomaticConfigurator
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.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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
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.