public class ServiceContainerImpl extends 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, DISPOSAL_DELAY_KEY, DYNAMICPROXY_ENABLED_KEY, INTERCEPTOR_KEY, INTERCEPTOR_LIST_KEY, RECONFIGURATION_DELAY_KEY, ROLE_NAME, SERVICEMANAGER_KEY, SERVICEMANAGER_LIST_KEY
AVALON_CONTAINER_YAAFI, COMPONENT_APP_ROOT, URN_AVALON_CLASSLOADER, URN_AVALON_HOME, URN_AVALON_NAME, URN_AVALON_PARTITION, URN_AVALON_TEMP
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 |
decommission(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(String name)
Get a RoleEntryImpl for a given service
|
boolean |
hasService(String name) |
void |
initialize() |
Object |
lookup(String name)
Lookup a service instance.
|
void |
parameterize(org.apache.avalon.framework.parameters.Parameters parameters) |
void |
reconfigure(org.apache.avalon.framework.configuration.Configuration configuration)
Reconfiguring the services.
|
void |
reconfigure(String[] names)
Reconfigures a set of services by calling Suspendable.suspend(),
Reconfigurable.reconfigure() and Suspendable.resume().
|
void |
release(Object object) |
void |
service(org.apache.avalon.framework.service.ServiceManager serviceManager) |
String |
toString() |
public ServiceContainerImpl()
public void enableLogging(org.apache.avalon.framework.logger.Logger logger)
enableLogging
in interface org.apache.avalon.framework.logger.LogEnabled
LogEnabled.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.Contextualizable
org.apache.avalon.framework.context.ContextException
Contextualizable.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.Serviceable
org.apache.avalon.framework.service.ServiceException
Serviceable.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.Configurable
org.apache.avalon.framework.configuration.ConfigurationException
Configurable.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.Parameterizable
org.apache.avalon.framework.parameters.ParameterException
Parameterizable.parameterize(org.apache.avalon.framework.parameters.Parameters)
public void initialize() throws Exception
initialize
in interface org.apache.avalon.framework.activity.Initializable
Exception
Initializable.initialize()
public void dispose()
dispose
in interface org.apache.avalon.framework.activity.Disposable
Disposable.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.Reconfigurable
org.apache.avalon.framework.configuration.ConfigurationException
Reconfigurable.reconfigure(org.apache.avalon.framework.configuration.Configuration)
public RoleEntry getRoleEntry(String name) throws org.apache.avalon.framework.service.ServiceException
ServiceLifecycleManager
getRoleEntry
in interface ServiceLifecycleManager
name
- the name of the service componentorg.apache.avalon.framework.service.ServiceException
- the service was not foundServiceLifecycleManager.getRoleEntry(java.lang.String)
public RoleEntry[] getRoleEntries()
ServiceLifecycleManager
getRoleEntries
in interface ServiceLifecycleManager
ServiceLifecycleManager.getRoleEntries()
public void reconfigure(String[] names) throws org.apache.avalon.framework.service.ServiceException, org.apache.avalon.framework.configuration.ConfigurationException
ServiceLifecycleManager
reconfigure
in interface ServiceLifecycleManager
names
- 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(String name)
hasService
in interface org.apache.avalon.framework.service.ServiceManager
ServiceManager.hasService(java.lang.String)
public Object lookup(String name) throws org.apache.avalon.framework.service.ServiceException
lookup
in interface org.apache.avalon.framework.service.ServiceManager
org.apache.avalon.framework.service.ServiceException
ServiceManager.lookup(java.lang.String)
public void release(Object object)
release
in interface org.apache.avalon.framework.service.ServiceManager
public void decommission(String name) throws org.apache.avalon.framework.service.ServiceException
ServiceLifecycleManager
decommission
in interface ServiceLifecycleManager
name
- the name of the serviceorg.apache.avalon.framework.service.ServiceException
- the service was not foundServiceLifecycleManager.decommission(java.lang.String)
public org.apache.avalon.framework.parameters.Parameters getParameters()
ServiceContainer
getParameters
in interface ServiceContainer
ServiceContainer.getParameters()
public String toString()
toString
in class Object
Object.toString()
Copyright © 2004–1970 The Apache Software Foundation. All rights reserved.