|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.picocontainer.gems.containers.Log4jTracingContainerDecorator
@Deprecated public class Log4jTracingContainerDecorator
Decorates a MutablePicoContainer to provide extensive tracing capabilities for all function calls into the Picocontainers.
By default, this class uses org.picocontainer.PicoContainer as its logging category, however, this may be changed by providing the logger in its alternate constructor.
Start and Stop events are logged under info priority, as are all conditions where querying for an object returns a null object (e.g., getComponentAdapter(Object) returns null). All other functions use debug priority.
If used in nanocontainer, you can add wrap your PicoContainer with the Log4jTracingContainerDecorator: (Groovy Example)
pico = builder.container(parent: parent) { //addComponent(.....) //And others. } //Wrap the underlying NanoContainer with a Decorated Pico. pico = new org.picocontainer.gems.containers.Log4jTracingContainerDecorator (pico.getPico())
Constructor Summary | |
---|---|
Log4jTracingContainerDecorator(MutablePicoContainer delegate)
Deprecated. Default typical wrapper that wraps another MutablePicoContainer. |
|
Log4jTracingContainerDecorator(MutablePicoContainer delegate,
org.apache.log4j.Logger logger)
Deprecated. Alternate constructor that allows specification of the Logger to use. |
Method Summary | ||
---|---|---|
void |
accept(PicoVisitor visitor)
Deprecated. |
|
MutablePicoContainer |
addAdapter(ComponentAdapter componentAdapter)
Deprecated. |
|
MutablePicoContainer |
addChildContainer(PicoContainer child)
Deprecated. |
|
MutablePicoContainer |
addComponent(Object implOrInstance)
Deprecated. |
|
MutablePicoContainer |
addComponent(Object componentKey,
Object componentImplementationOrInstance,
Parameter... parameters)
Deprecated. |
|
MutablePicoContainer |
addConfig(String name,
Object val)
Deprecated. |
|
MutablePicoContainer |
as(Properties... properties)
Deprecated. |
|
MutablePicoContainer |
change(Properties... properties)
Deprecated. |
|
void |
dispose()
Deprecated. |
|
|
getComponent(Class<T> componentType)
Deprecated. |
|
|
getComponent(Class<T> componentType,
Class<? extends Annotation> binding)
Deprecated. |
|
Object |
getComponent(Object componentKeyOrType)
Deprecated. |
|
Object |
getComponent(Object componentKeyOrType,
Type into)
Deprecated. |
|
|
getComponentAdapter(Class<T> componentType,
Class<? extends Annotation> binding)
Deprecated. |
|
|
getComponentAdapter(Class<T> componentType,
NameBinding componentNameBinding)
Deprecated. |
|
ComponentAdapter<?> |
getComponentAdapter(Object componentKey)
Deprecated. |
|
Collection<ComponentAdapter<?>> |
getComponentAdapters()
Deprecated. |
|
|
getComponentAdapters(Class<T> componentType)
Deprecated. |
|
|
getComponentAdapters(Class<T> componentType,
Class<? extends Annotation> binding)
Deprecated. |
|
List |
getComponents()
Deprecated. |
|
|
getComponents(Class<T> componentType)
Deprecated. |
|
Converters |
getConverters()
Deprecated. |
|
org.apache.log4j.Logger |
getLoggerUsed()
Deprecated. Retrieves the logger instance used by this decorator. |
|
PicoContainer |
getParent()
Deprecated. |
|
MutablePicoContainer |
makeChildContainer()
Deprecated. |
|
protected void |
onKeyOrTypeDoesNotExistInContainer(Object componentKeyOrType,
org.apache.log4j.Logger target)
Deprecated. Standard message handling for cases when a null object is returned for a given key. |
|
boolean |
removeChildContainer(PicoContainer child)
Deprecated. |
|
ComponentAdapter |
removeComponent(Object componentKey)
Deprecated. |
|
ComponentAdapter |
removeComponentByInstance(Object componentInstance)
Deprecated. |
|
void |
setLifecycleState(LifecycleState lifecycleState)
Deprecated. |
|
void |
setName(String name)
Deprecated. |
|
void |
start()
Deprecated. |
|
void |
stop()
Deprecated. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Log4jTracingContainerDecorator(MutablePicoContainer delegate)
delegate
- Container to be decorated.
NullPointerException
- if delegate is null.public Log4jTracingContainerDecorator(MutablePicoContainer delegate, org.apache.log4j.Logger logger)
delegate
- Container to be decorated.logger
- specific Log4j Logger to use.
NullPointerException
- if delegate or logger is null.Method Detail |
---|
protected void onKeyOrTypeDoesNotExistInContainer(Object componentKeyOrType, org.apache.log4j.Logger target)
componentKeyOrType
- Component key that does not existtarget
- Logger to log intopublic void accept(PicoVisitor visitor)
accept
in interface PicoContainer
visitor
- PicoContainer.accept(org.picocontainer.PicoVisitor)
public MutablePicoContainer addChildContainer(PicoContainer child)
addChildContainer
in interface MutablePicoContainer
child
-
MutablePicoContainer.addChildContainer(org.picocontainer.PicoContainer)
public void dispose()
dispose
in interface Disposable
Disposable.dispose()
public ComponentAdapter<?> getComponentAdapter(Object componentKey)
getComponentAdapter
in interface PicoContainer
componentKey
-
PicoContainer.getComponentAdapter(java.lang.Object)
public <T> ComponentAdapter<T> getComponentAdapter(Class<T> componentType, NameBinding componentNameBinding)
getComponentAdapter
in interface PicoContainer
componentType
-
org.picocontainer.PicoContainer#getComponentAdapter(java.lang.Class)
public Collection<ComponentAdapter<?>> getComponentAdapters()
getComponentAdapters
in interface PicoContainer
PicoContainer.getComponentAdapters()
public <T> List<ComponentAdapter<T>> getComponentAdapters(Class<T> componentType)
getComponentAdapters
in interface PicoContainer
componentType
-
PicoContainer.getComponentAdapters(java.lang.Class)
public <T> List<ComponentAdapter<T>> getComponentAdapters(Class<T> componentType, Class<? extends Annotation> binding)
getComponentAdapters
in interface PicoContainer
public <T> ComponentAdapter<T> getComponentAdapter(Class<T> componentType, Class<? extends Annotation> binding)
getComponentAdapter
in interface PicoContainer
public Object getComponent(Object componentKeyOrType)
getComponent
in interface PicoContainer
componentKeyOrType
-
PicoContainer.getComponent(java.lang.Object)
public Object getComponent(Object componentKeyOrType, Type into)
getComponent
in interface PicoContainer
public <T> T getComponent(Class<T> componentType)
getComponent
in interface PicoContainer
public <T> T getComponent(Class<T> componentType, Class<? extends Annotation> binding)
getComponent
in interface PicoContainer
public List getComponents()
getComponents
in interface PicoContainer
PicoContainer.getComponents()
public <T> List<T> getComponents(Class<T> componentType)
getComponents
in interface PicoContainer
componentType
-
PicoContainer.getComponents(java.lang.Class)
public PicoContainer getParent()
getParent
in interface PicoContainer
PicoContainer.getParent()
public MutablePicoContainer makeChildContainer()
makeChildContainer
in interface MutablePicoContainer
MutablePicoContainer.makeChildContainer()
public MutablePicoContainer addAdapter(ComponentAdapter componentAdapter)
addAdapter
in interface MutablePicoContainer
componentAdapter
-
MutablePicoContainer.addAdapter(org.picocontainer.ComponentAdapter)
public MutablePicoContainer addComponent(Object componentKey, Object componentImplementationOrInstance, Parameter... parameters)
addComponent
in interface MutablePicoContainer
componentKey
- componentImplementationOrInstance
- parameters
-
public MutablePicoContainer addComponent(Object implOrInstance)
addComponent
in interface MutablePicoContainer
implOrInstance
-
MutablePicoContainer.addComponent(java.lang.Object)
public MutablePicoContainer addConfig(String name, Object val)
addConfig
in interface MutablePicoContainer
public boolean removeChildContainer(PicoContainer child)
removeChildContainer
in interface MutablePicoContainer
child
-
MutablePicoContainer.removeChildContainer(org.picocontainer.PicoContainer)
public void start()
start
in interface Startable
Startable.start()
public void stop()
stop
in interface Startable
Startable.stop()
public ComponentAdapter removeComponent(Object componentKey)
removeComponent
in interface MutablePicoContainer
componentKey
-
MutablePicoContainer.removeComponent(java.lang.Object)
public ComponentAdapter removeComponentByInstance(Object componentInstance)
removeComponentByInstance
in interface MutablePicoContainer
componentInstance
-
MutablePicoContainer.removeComponentByInstance(java.lang.Object)
public org.apache.log4j.Logger getLoggerUsed()
public MutablePicoContainer change(Properties... properties)
change
in interface MutablePicoContainer
public MutablePicoContainer as(Properties... properties)
as
in interface MutablePicoContainer
public void setName(String name)
setName
in interface MutablePicoContainer
public void setLifecycleState(LifecycleState lifecycleState)
setLifecycleState
in interface MutablePicoContainer
public Converters getConverters()
getConverters
in interface Converting
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |