|
Keel 2.1RC2 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.avalon.fortress.impl.AbstractContainer
org.apache.avalon.fortress.impl.DefaultContainer
This is the default implementation of Container, adding configuration markup semantics to the AbstractContainer.
| Field Summary |
| Fields inherited from class org.apache.avalon.fortress.impl.AbstractContainer |
DEFAULT_ENTRY, m_classLoader, m_commandSink, m_componentContext, m_components, m_context, m_extManager, m_instrumentManager, m_loggerManager, m_mapper, m_metaManager, m_poolManager, m_serviceManager, m_shutDownOrder, SELECTOR_ENTRY |
| Fields inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled |
|
| Fields inherited from interface org.apache.avalon.fortress.Container |
ROLE |
| Constructor Summary | |
DefaultContainer() |
|
| Method Summary | |
void |
configure(Configuration config)Process the configuration and set up the components and their mappings. |
private int |
getActivation(Configuration component)Helper method to determine the activation policy for a given component handler configuration. |
private java.lang.String |
getClassname(Configuration config)Retrieve the classname for component configuration. |
ServiceManager |
getServiceManager()Return the ServiceManager that exposes all the services in impl. |
protected void |
interpretProxy(java.lang.String proxyType)Interpret the ProxyManager type from the configuration element. |
| Methods inherited from class org.apache.avalon.fortress.impl.AbstractContainer |
addComponent, contextualize, createHintMap, createObjectFactory, dispose, get, getProxyManager, getRoleKey, has, initialize, provideComponentContext, provideServiceManager, service, setProxyManager |
| Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled |
enableLogging, getLogger, setupLogger, setupLogger, setupLogger |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public DefaultContainer()
| Method Detail |
public void configure(Configuration config)
throws ConfigurationException
Process the configuration and set up the components and their mappings. At this point, all components are prepared and all mappings are made. However, nothing is initialized.
The configuration format follows a specific convention:
Container's MetaInfoManager or RoleManager<component> configuration elements may be used. These elements specify implementation class directly via the class attribute.Please note: each configuration element must have a unique id. If a configuration element does not have a unique id, it will not be treated as a component. This id is used later as a hint when there is more than one implementation of a role.
The first component encourted which implements a specific role becomes the default implemenation of that role. This can be changed by the default attribute in this configuration.
<my-config>
<component id="default-connection"
class="org.apache.avalon.excalibur.datasource.JdbcDataSourceComponent">
<!-- Component specific configuration -->
</component>
<jdbc-data-source id="another-connection">
<!-- Component specific configuration -->
</jdbc-data-source>
</my-config>
configure in interface Configurableconfig - The configuration element to translate into the list of components this impl managers.ConfigurationException - if the configuration is not valid
protected void interpretProxy(java.lang.String proxyType)
throws ConfigurationException
proxyType -ConfigurationException
private java.lang.String getClassname(Configuration config)
throws ConfigurationException
config - the component configurationConfigurationException
private int getActivation(Configuration component)
throws ConfigurationException
component - ConfigurationConfigurationException - if the handler specifies an unknown activation policypublic ServiceManager getServiceManager()
getServiceManager in class AbstractContainer
|
Keel 2.1RC2 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||