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 Summary
FieldsModifier and TypeFieldDescriptionprotected ServiceContainerConfigurationThe YAAFI configurationprotected intThe log level of the containerprotected ServiceContainerComponent managerFields inherited from interface org.apache.fulcrum.yaafi.container.Container
COMPONENT_APP_ROOT, URN_AVALON_HOME, URN_AVALON_TEMP -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddecommission(String name) Decommission the servicevoiddispose()Disposes of the container and releases resourcesintvoidReturns an instance of the named componentvoidReleases the componentvoidrelease(org.apache.avalon.framework.component.Component component) Releases the component implementing the Component interface.voidsetLogLevel(int logLevel) voidStarts up the container and initializes it.Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
Field Details
-
config
The YAAFI configuration -
manager
Component manager -
logLevel
protected int logLevelThe log level of the container
-
-
Constructor Details
-
ContainerImpl
public ContainerImpl(org.apache.avalon.framework.logger.Logger logger) Constructor -
ContainerImpl
public ContainerImpl()
-
-
Method Details
-
startup
Starts up the container and initializes it. -
initialize
- Specified by:
initializein interfaceorg.apache.avalon.framework.activity.Initializable- Throws:
Exception
-
dispose
public void dispose()Disposes of the container and releases resources- Specified by:
disposein 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- the named component to release
-
release
Releases the component -
decommission
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)
-