Project JXTA

net.jxta.peergroup
Interface Configurator


public interface Configurator

A configurator is responsible for the persistence and validation of configuration parameters.


Method Summary
 ConfigParams getConfigParams()
          Retrieve the parameters associcated with this configuration from the default location.
 ConfigParams load()
          Retrieves the persisted parameters associated with this configuration from the standard location.
 boolean save()
          Persist the parameters associated with this configuration to the standard location.
 void setConfigParams(ConfigParams cp)
          Sets the parameters associated with this configuration object to the provided values.
 

Method Detail

getConfigParams

ConfigParams getConfigParams()
                             throws ConfiguratorException
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.

Returns:
The configuration parameters.
Throws:
ConfiguratorException - If there was a failure in retrieving the parameters. This is normally a chained exception to the underlying cause.

setConfigParams

void setConfigParams(ConfigParams cp)
Sets the parameters associated with this configuration object to the provided values.

Parameters:
cp - The parameters to be associated with this configuration.

load

ConfigParams load()
                  throws ConfiguratorException
Retrieves the persisted parameters associated with this configuration from the standard location.

Returns:
The configuration parameters.
Throws:
ConfiguratorException - If there was a failure in retrieiving the persisted parameters. This is normally a chained exception to the underlying cause.

save

boolean save()
             throws ConfiguratorException
Persist the parameters associated with this configuration to the standard location.

Returns:
true if the configuration was successfully saved otherwise false. If the parameters are not persisted then false/code> is returned.
Throws:
ConfiguratorException - If there was a failure in persisting the parameters. This is normally a chained exception to the underlying cause.

JXTA J2SE