org.apache.avalon.fortress.impl
Class DefaultContainerManager
java.lang.Object
org.apache.avalon.fortress.impl.DefaultContainerManager
- All Implemented Interfaces:
- ContainerConstants, ContainerManager, ContainerManagerConstants, Disposable, Initializable
- public class DefaultContainerManager
- extends java.lang.Object
- implements Initializable, Disposable, ContainerManager, ContainerManagerConstants
This is the default implementation of the ContainerManager interface. See that interface for a description.
- Version:
- CVS $Revision: 1.29 $ $Date: 2004/02/28 15:16:24 $
- Author:
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
m_contextManager
private final ContextManager m_contextManager
-
m_logger
private final Logger m_logger
-
m_containerInstance
private java.lang.Object m_containerInstance
-
DefaultContainerManager
public DefaultContainerManager(ContextManager contextManager)
DefaultContainerManager
public DefaultContainerManager(ContextManager contextManager,
Logger logger)
DefaultContainerManager
public DefaultContainerManager(Context initParameters)
throws java.lang.Exception
DefaultContainerManager
public DefaultContainerManager(Context initParameters,
Logger logger)
throws java.lang.Exception
getInitializedContextManager
private static ContextManager getInitializedContextManager(Context initParameters,
Logger logger)
throws java.lang.Exception
-
Creates and initializes a contextManager given an initialization context. This is necessary so that these operations can complete before the super constructor has been executed.
-
-
- Throws:
java.lang.Exception
createLoggerFromContext
protected Logger createLoggerFromContext(Context initParameters)
-
-
initialize
public void initialize()
throws java.lang.Exception
-
Initialize the ContainerManager
-
- Specified by:
initialize in interface Initializable
-
- Throws:
java.lang.Exception - if an error occurs
initializeContainer
protected void initializeContainer()
throws InitializationException
-
-
- Throws:
InitializationException
createContainer
private void createContainer()
throws InitializationException
-
-
- Throws:
InitializationException
getContextEntry
private java.lang.Object getContextEntry(Context context,
java.lang.String key)
-
Retrieve an entry from context if it exists, else return null.
-
-
- Parameters:
context - the context
key - the key
- Returns:
- the entry
disposeContainer
protected void disposeContainer()
-
-
dispose
public void dispose()
-
Dispose of the ContainerManager and managed Container
-
- Specified by:
dispose in interface Disposable
-
getContainer
public java.lang.Object getContainer()
-
Get a reference to your Container. Typically, you would cast this to whatever interface you will use to interact with it.
-
- Specified by:
getContainer in interface ContainerManager
-
- Returns:
- the container implementation
getLogger
public final Logger getLogger()
-
Allows to get the logger and associated hierarchy for logging.
-
-
- Returns:
- Logger
Please see keelframework.org for information about new Keel releases.