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 ServiceContainerConfiguration
The YAAFI configurationprotected int
The log level of the containerprotected ServiceContainer
Component 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 TypeMethodDescriptionvoid
decommission
(String name) Decommission the servicevoid
dispose()
Disposes of the container and releases resourcesint
void
Returns an instance of the named componentvoid
Releases the componentvoid
release
(org.apache.avalon.framework.component.Component component) Releases the component implementing the Component interface.void
setLogLevel
(int logLevel) void
Starts 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:
initialize
in interfaceorg.apache.avalon.framework.activity.Initializable
- Throws:
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
- 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)
-