Klasse ServiceContainerImpl

java.lang.Object
org.apache.fulcrum.yaafi.framework.container.ServiceContainerImpl
Alle implementierten Schnittstellen:
org.apache.avalon.framework.activity.Disposable, org.apache.avalon.framework.activity.Initializable, org.apache.avalon.framework.configuration.Configurable, org.apache.avalon.framework.configuration.Reconfigurable, org.apache.avalon.framework.context.Contextualizable, org.apache.avalon.framework.logger.LogEnabled, org.apache.avalon.framework.parameters.Parameterizable, org.apache.avalon.framework.service.Serviceable, org.apache.avalon.framework.service.ServiceManager, AvalonYaafiConstants, ServiceConstants, ServiceContainer, ServiceLifecycleManager

public class ServiceContainerImpl extends Object implements ServiceContainer, ServiceConstants
Yet another avalon framework implementation (YAAFI).
Autor:
Siegfried Goeschl
  • Konstruktordetails

    • ServiceContainerImpl

      public ServiceContainerImpl()
      Constructor using sensible defaults.
  • Methodendetails

    • enableLogging

      public void enableLogging(org.apache.avalon.framework.logger.Logger logger)
      Angegeben von:
      enableLogging in Schnittstelle org.apache.avalon.framework.logger.LogEnabled
      Siehe auch:
      • LogEnabled.enableLogging(org.apache.avalon.framework.logger.Logger)
    • contextualize

      public void contextualize(org.apache.avalon.framework.context.Context context) throws org.apache.avalon.framework.context.ContextException
      Angegeben von:
      contextualize in Schnittstelle org.apache.avalon.framework.context.Contextualizable
      Löst aus:
      org.apache.avalon.framework.context.ContextException
      Siehe auch:
      • Contextualizable.contextualize(org.apache.avalon.framework.context.Context)
    • service

      public void service(org.apache.avalon.framework.service.ServiceManager serviceManager) throws org.apache.avalon.framework.service.ServiceException
      Angegeben von:
      service in Schnittstelle org.apache.avalon.framework.service.Serviceable
      Löst aus:
      org.apache.avalon.framework.service.ServiceException
      Siehe auch:
      • Serviceable.service(org.apache.avalon.framework.service.ServiceManager)
    • configure

      public void configure(org.apache.avalon.framework.configuration.Configuration configuration) throws org.apache.avalon.framework.configuration.ConfigurationException
      Angegeben von:
      configure in Schnittstelle org.apache.avalon.framework.configuration.Configurable
      Löst aus:
      org.apache.avalon.framework.configuration.ConfigurationException
      Siehe auch:
      • Configurable.configure(org.apache.avalon.framework.configuration.Configuration)
    • parameterize

      public void parameterize(org.apache.avalon.framework.parameters.Parameters parameters) throws org.apache.avalon.framework.parameters.ParameterException
      Angegeben von:
      parameterize in Schnittstelle org.apache.avalon.framework.parameters.Parameterizable
      Löst aus:
      org.apache.avalon.framework.parameters.ParameterException
      Siehe auch:
      • Parameterizable.parameterize(org.apache.avalon.framework.parameters.Parameters)
    • initialize

      public void initialize() throws Exception
      Angegeben von:
      initialize in Schnittstelle org.apache.avalon.framework.activity.Initializable
      Löst aus:
      Exception
      Siehe auch:
      • Initializable.initialize()
    • dispose

      public void dispose()
      Disposes the service container implementation.
      Angegeben von:
      dispose in Schnittstelle org.apache.avalon.framework.activity.Disposable
      Siehe auch:
      • Disposable.dispose()
    • reconfigure

      public void reconfigure(org.apache.avalon.framework.configuration.Configuration configuration) throws org.apache.avalon.framework.configuration.ConfigurationException
      Reconfiguring the services. I'm not sure how to implement this properly since the Avalon docs is vague on this subject. For now we suspend, reconfigure and resume the services in the correct order.
      Angegeben von:
      reconfigure in Schnittstelle org.apache.avalon.framework.configuration.Reconfigurable
      Löst aus:
      org.apache.avalon.framework.configuration.ConfigurationException
      Siehe auch:
      • Reconfigurable.reconfigure(org.apache.avalon.framework.configuration.Configuration)
    • getRoleEntry

      public RoleEntry getRoleEntry(String name) throws org.apache.avalon.framework.service.ServiceException
      Beschreibung aus Schnittstelle kopiert: ServiceLifecycleManager
      Get a RoleEntryImpl for a given service
      Angegeben von:
      getRoleEntry in Schnittstelle ServiceLifecycleManager
      Parameter:
      name - the name of the service component
      Gibt zurück:
      the RoleEntryImpl
      Löst aus:
      org.apache.avalon.framework.service.ServiceException - the service was not found
      Siehe auch:
    • getRoleEntries

      public RoleEntry[] getRoleEntries()
      Beschreibung aus Schnittstelle kopiert: ServiceLifecycleManager
      Get a list of all RoleEntries.
      Angegeben von:
      getRoleEntries in Schnittstelle ServiceLifecycleManager
      Gibt zurück:
      a list of RoleEntries
      Siehe auch:
    • reconfigure

      public void reconfigure(String[] names) throws org.apache.avalon.framework.service.ServiceException, org.apache.avalon.framework.configuration.ConfigurationException
      Beschreibung aus Schnittstelle kopiert: ServiceLifecycleManager
      Reconfigures a set of services by calling Suspendable.suspend(), Reconfigurable.reconfigure() and Suspendable.resume().
      Angegeben von:
      reconfigure in Schnittstelle ServiceLifecycleManager
      Parameter:
      names - the set of services to be reconfigured
      Löst aus:
      org.apache.avalon.framework.service.ServiceException - one of the service was not found
      org.apache.avalon.framework.configuration.ConfigurationException - the reconfiguration failed
      Siehe auch:
    • hasService

      public boolean hasService(String name)
      Angegeben von:
      hasService in Schnittstelle org.apache.avalon.framework.service.ServiceManager
      Siehe auch:
      • ServiceManager.hasService(java.lang.String)
    • lookup

      public Object lookup(String name) throws org.apache.avalon.framework.service.ServiceException
      Lookup a service instance. The implementation uses the following mechanism
      • look for a matching local service
      • use the fallback service manager as they might know the service
      • ask the parent service manager
      Angegeben von:
      lookup in Schnittstelle org.apache.avalon.framework.service.ServiceManager
      Löst aus:
      org.apache.avalon.framework.service.ServiceException
      Siehe auch:
      • ServiceManager.lookup(java.lang.String)
    • release

      public void release(Object object)
      Angegeben von:
      release in Schnittstelle org.apache.avalon.framework.service.ServiceManager
    • decommission

      public void decommission(String name) throws org.apache.avalon.framework.service.ServiceException
      Beschreibung aus Schnittstelle kopiert: ServiceLifecycleManager
      Decommision the given service by calling Startable.stop() and Disposable.dispose(). The state of the service component is the same as using lazy initialization. Therefore a new service instance will be created if the service is reused again. If you are keeping an instance of the service you are out of luck.
      Angegeben von:
      decommission in Schnittstelle ServiceLifecycleManager
      Parameter:
      name - the name of the service
      Löst aus:
      org.apache.avalon.framework.service.ServiceException - the service was not found
      Siehe auch:
    • getParameters

      public org.apache.avalon.framework.parameters.Parameters getParameters()
      Beschreibung aus Schnittstelle kopiert: ServiceContainer
      Return the Avalon parameters loaded by the Avalon service container
      Angegeben von:
      getParameters in Schnittstelle ServiceContainer
      Gibt zurück:
      the Avalon parameters
      Siehe auch:
    • toString

      public String toString()
      Setzt außer Kraft:
      toString in Klasse Object
      Siehe auch: