|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.sdm.quasar.client.core.common.config.AbstractConfigurationDescriptor
An abstract implementation of a ConfigurationDescriptor.
| Constructor Summary | |
AbstractConfigurationDescriptor(java.lang.Class configurationKeyClass)
Creates a new AbstractConfigurationDescriptor. |
|
AbstractConfigurationDescriptor(java.lang.String configurationKey)
Creates a new AbstractConfigurationDescriptor. |
|
| Method Summary | |
protected abstract java.lang.Object |
createConfigurationValue(java.lang.String key,
ConfigProvider configProvider)
Subclasses must implement this method to create the configuration value. |
void |
dispose()
Disposes the component. |
protected abstract void |
disposeConfigurationValue(java.lang.String key,
java.lang.Object value)
Subclasses must implement this method to dispose the configuration value. |
java.lang.String |
getKey()
Returns the key for the configuration entry. |
java.lang.Object |
getValue()
Returns the configuration value. |
boolean |
isLoaded()
Returns true, iff this ConfigurationDescriptor is loaded;
this means, loadConfiguration(ConfigProvider) was called before and
the value can be accessed. |
void |
loadConfiguration(ConfigProvider configProvider)
Loads the configuration, which means, that getValue() might be called.
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public AbstractConfigurationDescriptor(java.lang.String configurationKey)
AbstractConfigurationDescriptor.
configurationKey - the configuration keypublic AbstractConfigurationDescriptor(java.lang.Class configurationKeyClass)
AbstractConfigurationDescriptor.
| Method Detail |
public final java.lang.String getKey()
ConfigurationDescriptor
getKey in interface ConfigurationDescriptorConfigurationDescriptor.getKey()public java.lang.Object getValue()
ConfigurationDescriptorConfigurationDescriptor
is loaded.
getValue in interface ConfigurationDescriptorConfigurationDescriptor.getValue()public boolean isLoaded()
ConfigurationDescriptortrue, iff this ConfigurationDescriptor is loaded;
this means, ConfigurationDescriptor.loadConfiguration(ConfigProvider) was called before and
the value can be accessed.
isLoaded in interface ConfigurationDescriptorConfigurationDescriptor.isLoaded()public final void loadConfiguration(ConfigProvider configProvider)
ConfigurationDescriptorConfigurationDescriptor.getValue() might be called.
The call occures only once, until Disposable.dispose() is called.
loadConfiguration in interface ConfigurationDescriptorconfigProvider - the ConfigProvider, that may be used to access
other values.ConfigurationDescriptor.loadConfiguration(com.sdm.quasar.client.core.common.config.ConfigProvider)
public final void dispose()
throws DisposeException
Disposable
Important:
This method is called by an administrating component
and must never be called directly.
The implementation should release any resources or objects allocated and
any services registered. Furthermore, this method should be developed
carefully to free a maximum of resources even when the system may
have become unstable. In case of one or multiple errors, you should collect
them in a DisposeException, continue with the execution,
and throw it at the end of the method.
Note: The implementation must not return before the component is disposed. Any threads or asynchronous calls started must be completed before this method returns.
dispose in interface DisposableDisposeException - if there was one or more errors while
disposing the component.Disposable.dispose()
protected abstract java.lang.Object createConfigurationValue(java.lang.String key,
ConfigProvider configProvider)
key - the configuration key (not null)configProvider - the ConfigProvider registered to (not null)
protected abstract void disposeConfigurationValue(java.lang.String key,
java.lang.Object value)
key - the configuration key (not null)value - the configuration value
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||