Class ContainerImpl

java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.fulcrum.yaafi.container.ContainerImpl
All Implemented Interfaces:
org.apache.avalon.framework.activity.Disposable, org.apache.avalon.framework.activity.Initializable, org.apache.avalon.framework.logger.LogEnabled, Container

public class ContainerImpl extends org.apache.avalon.framework.logger.AbstractLogEnabled implements Container, org.apache.avalon.framework.activity.Initializable, org.apache.avalon.framework.activity.Disposable
This is a simple YAAFI based container that can be used to include fulcrum components.
Author:
Siegfried Goeschl
  • Field Details

  • Constructor Details

    • ContainerImpl

      public ContainerImpl(org.apache.avalon.framework.logger.Logger logger)
      Constructor
    • ContainerImpl

      public ContainerImpl()
  • Method Details

    • startup

      public void startup(String configFileName, String roleFileName, String parametersFileName)
      Starts up the container and initializes it.
      Specified by:
      startup in interface Container
      Parameters:
      configFileName - Name of the component configuration file
      roleFileName - Name of the role configuration file
      parametersFileName - Name of the parameters file
    • initialize

      public void initialize() throws Exception
      Specified by:
      initialize in interface org.apache.avalon.framework.activity.Initializable
      Throws:
      Exception
    • dispose

      public void dispose()
      Disposes of the container and releases resources
      Specified by:
      dispose in interface org.apache.avalon.framework.activity.Disposable
    • lookup

      public Object lookup(String roleName) throws org.apache.avalon.framework.component.ComponentException
      Returns an instance of the named component
      Specified by:
      lookup in interface Container
      Parameters:
      roleName - Name of the role the component fills.
      Returns:
      the instance of the named component
      Throws:
      org.apache.avalon.framework.component.ComponentException - generic exception
    • release

      public void release(org.apache.avalon.framework.component.Component component)
      Releases the component implementing the Component interface. This interface is deprecated but still around in Fulcrum
      Parameters:
      component - the named component to release
    • release

      public void release(Object component)
      Releases the component
      Specified by:
      release in interface Container
      Parameters:
      component - the named component to release
    • decommission

      public void decommission(String name) throws org.apache.avalon.framework.service.ServiceException
      Decommission the service
      Parameters:
      name - the name of the service
      Throws:
      org.apache.avalon.framework.service.ServiceException - if the service is not found
    • getLogLevel

      public int getLogLevel()
    • setLogLevel

      public void setLogLevel(int logLevel)