org.openeai.config
Interface EnterpriseConfigurationObject

All Known Implementing Classes:
AppConfig, CommandConfig, ConsumerConfig, DbConnectionPoolConfig, LoggerConfig, MessageObjectConfig, ProducerConfig, PropertyConfig, ScheduleConfig, ScheduledAppConfig, ThreadPoolConfig

public interface EnterpriseConfigurationObject

The interface that all 'configuration' objects implement. The reason we add this layer to our configuration strategy is so all our foundation components don't have to be 'xml aware'. This way we can abstract that requirement and if we ever decide to use anything besides or in addition to XML for configuration information, we just have to change this layer and not our framework components per se. The foundation objects are configured using these 'configuration' Java objects, not XML.

Configuration objects are used like Java Properties objects except for the fact that by using XML to specify the configuration of a certain type of object, we can constrain that configuration and provide a meaningful, relatively simple way to configure our applications and more specifically, the objects that those applications use.

Version:
3.0 beta2 - 28 January 2003
Author:
Tod Jackson (tod@openeai.org), Steve Wheat (steve@openeai.org)

Method Summary
 java.lang.String getAppName()
          This method returns the application name to which this configuration object (and ultimately the object being configured) is associated.
 java.util.Properties getProperties()
          This method returns the properties object associated to the configuration object implementation.
 void init(org.jdom.Element configElement)
          This method is called by AppConfig as it reads through the deployment document and parses Configuration information for each object that will be held by AppConfig.
 void setAppName(java.lang.String name)
          This method sets the application name to which this configuration object (and ultimately the object being configured) is associated.
 

Method Detail

init


public void init(org.jdom.Element configElement)
          throws EnterpriseConfigurationObjectException
This method is called by AppConfig as it reads through the deployment document and parses Configuration information for each object that will be held by AppConfig. The Element that is passed to this init method is the 'configuration' element for the type of object being initialized. For example, the configuration element passed in might be a MessageObjectConfig element or a ProducerConfig element. The MessageObjectConfig and ProducerConfig Java objects that are implementations of this interface would then look for the appropriate configuration information contained within that element and that is associated to that type of object and initialize itself with it. Then, AppConfig will construct a MessageObject or Producer using the MessageObjectConfig and ProducerConfig java objects respectively.

EnterpriseConfigurationObjectException

getProperties


public java.util.Properties getProperties()
This method returns the properties object associated to the configuration object implementation. Many configuration parameters are simply turned into a Java Properties object for use by the objects that will be configured using the implementation.

Returns:
Properties the properties object associated to the Configuration implementation that might contain simple property like information depending on the implementation. It is entirely up to the configuration object implementation and the object that will be configured using that implementation as to what goes into a Properties object and what does not.

setAppName


public void setAppName(java.lang.String name)
This method sets the application name to which this configuration object (and ultimately the object being configured) is associated. Since all applications are basically a collection of objects that are used within that application the application name can be associated to all objects used by that application. This can be useful information in an enterprise utilizing these foundational objects within there applications.


getAppName


public java.lang.String getAppName()
This method returns the application name to which this configuration object (and ultimately the object being configured) is associated. Since all applications are basically a collection of objects that are used within that application the application name can be associated to all objects used by that application. This can be useful information in an enterprise utilizing these foundational objects within there applications.

Returns:
String the name of the application to which this object is associated.


Copyright © 2002, OpenEAI Software Foundation