Package org.apache.fulcrum.testcontainer
Class YAAFIContainer
- java.lang.Object
-
- org.apache.avalon.framework.logger.AbstractLogEnabled
-
- org.apache.fulcrum.testcontainer.YAAFIContainer
-
- All Implemented Interfaces:
org.apache.avalon.framework.activity.Disposable
,org.apache.avalon.framework.activity.Initializable
,org.apache.avalon.framework.logger.LogEnabled
,Container
public class YAAFIContainer extends org.apache.avalon.framework.logger.AbstractLogEnabled implements Container
This is a simple YAAFI based container that can be used in unit test of the fulcrum components.- Author:
- Siegfried Goeschl
-
-
Field Summary
-
Fields inherited from interface org.apache.fulcrum.testcontainer.Container
COMPONENT_APP_ROOT, URN_AVALON_HOME, URN_AVALON_TEMP
-
-
Constructor Summary
Constructors Constructor Description YAAFIContainer()
Constructor.YAAFIContainer(int logLevel)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
dispose()
Disposes of the container and releases resources.void
initialize()
Initializes the container.Object
lookup(String roleName)
Returns an instance of the named component.void
release(Object component)
Releases the component.void
release(org.apache.avalon.framework.component.Component component)
Releases the component implementing the Component interface.void
startup(String configFileName, String roleFileName, String parametersFileName)
Starts up the container and initializes it.
-
-
-
Constructor Detail
-
YAAFIContainer
public YAAFIContainer()
Constructor.
-
YAAFIContainer
public YAAFIContainer(int logLevel)
Constructor.- Parameters:
logLevel
- the log level to be used:ConsoleLogger
LEVEL_*.
-
-
Method Detail
-
startup
public void startup(String configFileName, String roleFileName, String parametersFileName)
Starts up the container and initializes it.
-
initialize
public void initialize() throws Exception
Initializes the container.- Specified by:
initialize
in interfaceorg.apache.avalon.framework.activity.Initializable
- Throws:
Exception
- generic exception
-
dispose
public void dispose()
Disposes of the container and releases resources.- Specified by:
dispose
in interfaceorg.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.
-
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
- instance of the component to release
-
-