|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.metamatrix.common.config.reader.PropertiesConfigurationReader
public class PropertiesConfigurationReader
This class implements a self-contained reader for the current configuration,
and should be used only by the CurrentConfiguration
framework. As such, this is an extremely low-level implementation that may
not use anything but com.metamatrix.common.util components
and only components that do not use LogManager.
Each class that implements this interface must supply a no-arg constructor.
| Field Summary | |
|---|---|
static java.lang.String |
FILENAME
The environment property name for the property file that contains the configuration. |
| Constructor Summary | |
|---|---|
PropertiesConfigurationReader()
Default, no-arg constructor |
|
| Method Summary | |
|---|---|
void |
close()
This method should close the connection to the repository that holds the current configuration. |
void |
connect(java.util.Properties env)
This method should connect to the repository that holds the current configuration, using the specified properties. |
ConfigurationModelContainer |
getConfigurationModel()
Obtain the next startup configuration model. |
void |
indicateSystemShutdown()
This will put the system into a state of StartupStateController.STATE_STOPPED. |
void |
performSystemInitialization(boolean forceInitialization)
This method should be called only by com.metamatrix.platform.util.MetaMatrixController
to initialize the system configurations during bootstrapping. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String FILENAME
| Constructor Detail |
|---|
public PropertiesConfigurationReader()
| Method Detail |
|---|
public void connect(java.util.Properties env)
throws ConfigurationConnectionException
connect in interface CurrentConfigurationReaderenv - the environment properties that define the information
ConfigurationConnectionException - if there is an error establishing the connection.
public void close()
throws java.lang.Exception
close in interface CurrentConfigurationReaderjava.lang.Exception - if there is an error establishing the connection.
public ConfigurationModelContainer getConfigurationModel()
throws ConfigurationException
getConfigurationModel in interface CurrentConfigurationReaderConfigurationException - if an error occurred within or during
communication with the repository.
public void indicateSystemShutdown()
throws ConfigurationException
CurrentConfigurationReaderStartupStateController.STATE_STOPPED.
indicateSystemShutdown in interface CurrentConfigurationReaderConfigurationException - if an error occurred in communication
with the configuration data source
public void performSystemInitialization(boolean forceInitialization)
throws StartupStateException,
ConfigurationException
CurrentConfigurationReadercom.metamatrix.platform.util.MetaMatrixController
to initialize the system configurations during bootstrapping.
This method will attempt to put the system state into
StartupStateController.STATE_STARTING, and then
commence with initialization. If the state is already
StartupStateController.STATE_STARTING, then another
MetaMatrixController is already currently in the process of
starting the system, and a StartupStateException
will be thrown. If this method returns without an
exception, then the system state will be in state
StartupStateController.STATE_STARTING, and the calling
code should proceed with startup.
performSystemInitialization in interface CurrentConfigurationReaderforceInitialization - if the system is in a state other than
StartupStateController.STATE_STOPPED, and the
administrator thinks the system actually crashed and is
not really running, he can choose to force the
initialization. Otherwise, if the system is in one of these states,
an exception will be thrown.
StartupStateException - if the system is
not in a state in which initialization can proceed. This
exception will indicate the current system state.
ConfigurationException - if the current configuration and/or
bootstrap properties could not be obtained
NOTE: This method replaces the begin... and finish.. SystemInitialization methods
for the new configuration implementations.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||