public class ServiceContainerImpl extends java.lang.Object implements ServiceContainer, ServiceConstants
CLAZZ_NAME, COMPONENT_CONFIG_KEY, COMPONENT_CONFIG_PROPERTIES_KEY, COMPONENT_CONFIG_VALUE, COMPONENT_CONTAINERFLAVOUR_VALUE, COMPONENT_ISENCRYPTED_KEY, COMPONENT_LOCATION_KEY, COMPONENT_PARAMETERS_KEY, COMPONENT_PARAMETERS_VALUE, COMPONENT_ROLE_KEYS, COMPONENT_ROLE_VALUE, COMPONENT_ROLECONFIGFLAVOUR_VALUE, CONTAINERCLAZZNAME_CONFIG_KEY, CONTAINERFLAVOUR_CONFIG_KEY, DYNAMICPROXY_ENABLED_KEY, INTERCEPTOR_KEY, INTERCEPTOR_LIST_KEY, RECONFIGURATION_DELAY_KEY, ROLE_NAMEAVALON_CONTAINER_YAAFI, COMPONENT_APP_ROOT, URN_AVALON_CLASSLOADER, URN_AVALON_HOME, URN_AVALON_NAME, URN_AVALON_PARTITION, URN_AVALON_TEMP, URN_YAAFI_KERNELLOCK| Constructor and Description |
|---|
ServiceContainerImpl()
Constructor using sensible defaults.
|
| Modifier and Type | Method and Description |
|---|---|
void |
configure(org.apache.avalon.framework.configuration.Configuration configuration) |
void |
contextualize(org.apache.avalon.framework.context.Context context) |
void |
decommision(java.lang.String name)
Decommision the given service by calling Startable.stop()
and Disposable.dispose().
|
void |
dispose()
Disposes the service container implementation.
|
void |
enableLogging(org.apache.avalon.framework.logger.Logger logger) |
org.apache.avalon.framework.parameters.Parameters |
getParameters()
Return the Avalon parameters loaded by the Avalon service container
|
RoleEntry[] |
getRoleEntries()
Get a list of all RoleEntries.
|
RoleEntry |
getRoleEntry(java.lang.String name)
Get a RoleEntryImpl for a given service
|
boolean |
hasService(java.lang.String name) |
void |
initialize() |
java.lang.Object |
lookup(java.lang.String name) |
void |
parameterize(org.apache.avalon.framework.parameters.Parameters parameters) |
void |
reconfigure(org.apache.avalon.framework.configuration.Configuration configuration)
Reconfiguring the services.
|
void |
reconfigure(java.lang.String[] names)
Reconfigures a set of services by calling Suspendable.suspend(),
Reconfigurable.reconfigure() and Suspendable.resume().
|
void |
release(java.lang.Object object) |
void |
service(org.apache.avalon.framework.service.ServiceManager serviceManager) |
java.lang.String |
toString() |
public ServiceContainerImpl()
public void enableLogging(org.apache.avalon.framework.logger.Logger logger)
enableLogging in interface org.apache.avalon.framework.logger.LogEnabledLogEnabled.enableLogging(org.apache.avalon.framework.logger.Logger)public void contextualize(org.apache.avalon.framework.context.Context context)
throws org.apache.avalon.framework.context.ContextException
contextualize in interface org.apache.avalon.framework.context.Contextualizableorg.apache.avalon.framework.context.ContextExceptionContextualizable.contextualize(org.apache.avalon.framework.context.Context)public void service(org.apache.avalon.framework.service.ServiceManager serviceManager)
throws org.apache.avalon.framework.service.ServiceException
service in interface org.apache.avalon.framework.service.Serviceableorg.apache.avalon.framework.service.ServiceExceptionServiceable.service(org.apache.avalon.framework.service.ServiceManager)public void configure(org.apache.avalon.framework.configuration.Configuration configuration)
throws org.apache.avalon.framework.configuration.ConfigurationException
configure in interface org.apache.avalon.framework.configuration.Configurableorg.apache.avalon.framework.configuration.ConfigurationExceptionConfigurable.configure(org.apache.avalon.framework.configuration.Configuration)public void parameterize(org.apache.avalon.framework.parameters.Parameters parameters)
throws org.apache.avalon.framework.parameters.ParameterException
parameterize in interface org.apache.avalon.framework.parameters.Parameterizableorg.apache.avalon.framework.parameters.ParameterExceptionParameterizable.parameterize(org.apache.avalon.framework.parameters.Parameters)public void initialize()
throws java.lang.Exception
initialize in interface org.apache.avalon.framework.activity.Initializablejava.lang.ExceptionInitializable.initialize()public void dispose()
dispose in interface org.apache.avalon.framework.activity.DisposableDisposable.dispose()public void reconfigure(org.apache.avalon.framework.configuration.Configuration configuration)
throws org.apache.avalon.framework.configuration.ConfigurationException
reconfigure in interface org.apache.avalon.framework.configuration.Reconfigurableorg.apache.avalon.framework.configuration.ConfigurationExceptionReconfigurable.reconfigure(org.apache.avalon.framework.configuration.Configuration)public RoleEntry getRoleEntry(java.lang.String name) throws org.apache.avalon.framework.service.ServiceException
ServiceLifecycleManagergetRoleEntry in interface ServiceLifecycleManagername - the name of the service componentorg.apache.avalon.framework.service.ServiceException - the service was not foundServiceLifecycleManager.getRoleEntry(java.lang.String)public RoleEntry[] getRoleEntries()
ServiceLifecycleManagergetRoleEntries in interface ServiceLifecycleManagerServiceLifecycleManager.getRoleEntries()public void reconfigure(java.lang.String[] names)
throws org.apache.avalon.framework.service.ServiceException,
org.apache.avalon.framework.configuration.ConfigurationException
ServiceLifecycleManagerreconfigure in interface ServiceLifecycleManagernames - the set of services to be reconfiguredorg.apache.avalon.framework.service.ServiceException - one of the service was not foundorg.apache.avalon.framework.configuration.ConfigurationException - the reconfiguration failedServiceLifecycleManager.reconfigure(java.lang.String[])public boolean hasService(java.lang.String name)
hasService in interface org.apache.avalon.framework.service.ServiceManagerServiceManager.hasService(java.lang.String)public java.lang.Object lookup(java.lang.String name)
throws org.apache.avalon.framework.service.ServiceException
lookup in interface org.apache.avalon.framework.service.ServiceManagerorg.apache.avalon.framework.service.ServiceExceptionServiceManager.lookup(java.lang.String)public void release(java.lang.Object object)
release in interface org.apache.avalon.framework.service.ServiceManagerServiceManager.release(java.lang.Object)public void decommision(java.lang.String name)
throws org.apache.avalon.framework.service.ServiceException
ServiceLifecycleManagerdecommision in interface ServiceLifecycleManagername - the name of the serviceorg.apache.avalon.framework.service.ServiceException - the service was not foundServiceLifecycleManager.decommision(java.lang.String)public org.apache.avalon.framework.parameters.Parameters getParameters()
ServiceContainergetParameters in interface ServiceContainerServiceContainer.getParameters()public java.lang.String toString()
toString in class java.lang.ObjectObject.toString()Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.