Klasse ServiceManagerServiceImpl

java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.fulcrum.yaafi.service.servicemanager.ServiceManagerServiceImpl
Alle implementierten Schnittstellen:
org.apache.avalon.framework.activity.Disposable, 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, ServiceManagerService

public class ServiceManagerServiceImpl extends org.apache.avalon.framework.logger.AbstractLogEnabled implements ServiceManagerService, org.apache.avalon.framework.context.Contextualizable, org.apache.avalon.framework.parameters.Parameterizable, org.apache.avalon.framework.service.Serviceable, org.apache.avalon.framework.activity.Disposable
This is a sort of "edelhack" to solve the problem of accessing the Avalon infrastructure without having an instance of the container. The implementation stores the very first instance of itself in a static variable which can be accessed using getInstance(). This allows access to the various Avalon artifacts.
Autor:
Siegfried Goeschl
  • Konstruktordetails

    • ServiceManagerServiceImpl

      public ServiceManagerServiceImpl()
      Constructor
  • Methodendetails

    • getInstance

      public static ServiceManagerService getInstance()
      Gibt zurück:
      the one and only instance of this class
    • setInstance

      protected static void setInstance(ServiceManagerServiceImpl instance)
      Create the one and only instance
      Parameter:
      instance - the instance
    • 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)
    • 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)
    • 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)
    • dispose

      public void dispose()
      Angegeben von:
      dispose in Schnittstelle org.apache.avalon.framework.activity.Disposable
      Siehe auch:
      • Disposable.dispose()
    • 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
      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
      Siehe auch:
      • ServiceManager.release(java.lang.Object)
    • getServiceManager

      public org.apache.avalon.framework.service.ServiceManager getServiceManager()
      Angegeben von:
      getServiceManager in Schnittstelle ServiceManagerService
      Gibt zurück:
      the ServiceManager for the container
    • getParameters

      public org.apache.avalon.framework.parameters.Parameters getParameters()
      Angegeben von:
      getParameters in Schnittstelle ServiceManagerService
      Gibt zurück:
      the Parameters for the container
    • getContext

      public org.apache.avalon.framework.context.Context getContext()
      Angegeben von:
      getContext in Schnittstelle ServiceManagerService
      Gibt zurück:
      the Context for the container
    • getAvalonLogger

      public org.apache.avalon.framework.logger.Logger getAvalonLogger()
      Angegeben von:
      getAvalonLogger in Schnittstelle ServiceManagerService
      Gibt zurück:
      the Logger of the container
      Siehe auch: