com.esf.core.configuration.service
Interface IConfigurationManagerService


public interface IConfigurationManagerService

The Configuration Manager Service provides an API for software components to request/receive/reject configuration data as well as request that configurations be archived within the Configuration Manager.

Author:
chad.kienle

Field Summary
static java.lang.String NEW_CONFIGURATION_TOPIC_BASE
          A static string representing the base topic for which components will listen on to receive new configuration events.
static java.lang.String SERVICE_NAME
          Reports the class name representing this interface.
 
Method Summary
 java.lang.Object getConfiguration(java.lang.String name)
          This method returns a Configuration Object.
 java.lang.Object rejectConfiguration(java.lang.String name)
          This method is used to inform that Configuration Manager that a component has rejected a configuration.
 void requestConfigurationUpdate(java.lang.String name)
          This method is used to request an update of a configuration from the configuration source/back-end.
 void storeConfiguration(java.lang.String name)
          This method is used to inform that Configuration Manager that the last supplied Configuration Object was accepted and should be stored in the archive.
 

Field Detail

SERVICE_NAME

public static final java.lang.String SERVICE_NAME
Reports the class name representing this interface.


NEW_CONFIGURATION_TOPIC_BASE

public static final java.lang.String NEW_CONFIGURATION_TOPIC_BASE
A static string representing the base topic for which components will listen on to receive new configuration events. When a component registers their EventHandler, the EVENT_TOPIC will be: NEW_CONFIGURATION_TOPIC_BASE + BUNDLE_ID; where BUNDLE_ID is the number assigned to the component bundle when installed in OSGi. A component can obtain it's bundle ID by methods supplied by the BundleContext class.

See Also:
Constant Field Values
Method Detail

getConfiguration

public java.lang.Object getConfiguration(java.lang.String name)
This method returns a Configuration Object. The component must specify a String representing its symbolic name. The Configuration Object will contain the current configuration data stored in the manager for the specified component. A component will use this method to obtain a new configuration after receiving a “new configuration” event.

Parameters:
name - A String representing the symbolic name of the requesting component.
Returns:
A Configuration Object containing typed configuration data. Null if no configuration exists.

requestConfigurationUpdate

public void requestConfigurationUpdate(java.lang.String name)
This method is used to request an update of a configuration from the configuration source/back-end. A component must specify a String representing its symbolic name. The Configuration Manager will respond by issuing a request for new configuration data from the configuration source/back-end. Upon arrival of the updated configuration data, a “new configuration” event will be published to the requesting component. The requesting component can then use the getConfiguration() method to obtain the Configuration Object containing the updated configuration data.

Parameters:
name - A String representing the symbolic name of the requesting component.

rejectConfiguration

public java.lang.Object rejectConfiguration(java.lang.String name)
This method is used to inform that Configuration Manager that a component has rejected a configuration. A component must specify a String representing its symbolic name. The Configuration Manager will then issue a configuration error corresponding to the specified component and return a Configuration Object representing the most recent stored configuration in the archive. If no stored or default configuration exists in the archive, the method will return null

Parameters:
name - A String representing the symbolic name of the rejecting component.
Returns:
A Configuration Object containing typed configuration data. Null if no configuration exists.

storeConfiguration

public void storeConfiguration(java.lang.String name)
This method is used to inform that Configuration Manager that the last supplied Configuration Object was accepted and should be stored in the archive. The Configuration Manager will then store the Configuration Object as in the archive as the current configuration.

Parameters:
name - A String representing the symbolic name of the requesting component.


Copyright © 2009 Eurotech Inc. All rights reserved.