ezc
Class DefaultContainerContext

java.lang.Object
  extended byezc.DefaultContainerContext
All Implemented Interfaces:
ContainerContext

public class DefaultContainerContext
extends java.lang.Object
implements ContainerContext

Default implementation of ContainerContext.

May be used as an adapter when implementing an application-specific ContainerContext.

Author:
Jens Wyke (jw@jenswyke.com)

Constructor Summary
DefaultContainerContext()
           
 
Method Summary
 java.lang.Object createComponent(java.lang.String key, ComponentContext ctx, java.lang.Class clazz)
          Responsible for creating and initiating component instances
 boolean isDebugLogEnabled()
           
 boolean isErrorLogEnabled()
           
 boolean isInfoLogEnabled()
           
 void logDebug(java.lang.Object msg)
           
 void logDebug(java.lang.Object msg, java.lang.Throwable t)
           
 void logError(java.lang.Object msg)
           
 void logError(java.lang.Object msg, java.lang.Throwable t)
           
 void logInfo(java.lang.Object msg)
           
 void logInfo(java.lang.Object msg, java.lang.Throwable t)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultContainerContext

public DefaultContainerContext()
Method Detail

logDebug

public void logDebug(java.lang.Object msg,
                     java.lang.Throwable t)
Specified by:
logDebug in interface ContainerContext

logDebug

public void logDebug(java.lang.Object msg)
Specified by:
logDebug in interface ContainerContext

logError

public void logError(java.lang.Object msg,
                     java.lang.Throwable t)
Specified by:
logError in interface ContainerContext

logError

public void logError(java.lang.Object msg)
Specified by:
logError in interface ContainerContext

logInfo

public void logInfo(java.lang.Object msg,
                    java.lang.Throwable t)
Specified by:
logInfo in interface ContainerContext

logInfo

public void logInfo(java.lang.Object msg)
Specified by:
logInfo in interface ContainerContext

createComponent

public java.lang.Object createComponent(java.lang.String key,
                                        ComponentContext ctx,
                                        java.lang.Class clazz)
                                 throws java.lang.Exception
Description copied from interface: ContainerContext
Responsible for creating and initiating component instances

is called from within the container when an instance is requested

Specified by:
createComponent in interface ContainerContext
Parameters:
key - unique identifier for the component within it's container
ctx - context of the component, provides access to the components (or regular objects) which the current component has registered a dependancy upon
clazz - implentation class for the component
Returns:
Throws:
java.lang.Exception
See Also:
ezc.ComponentCreator#createComponent(java.lang.String, ezc.ComponentContext, ezc.ConfigurationReader, java.lang.Class)

isDebugLogEnabled

public boolean isDebugLogEnabled()
Specified by:
isDebugLogEnabled in interface ContainerContext

isErrorLogEnabled

public boolean isErrorLogEnabled()
Specified by:
isErrorLogEnabled in interface ContainerContext

isInfoLogEnabled

public boolean isInfoLogEnabled()
Specified by:
isInfoLogEnabled in interface ContainerContext