Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.picocontainer.gems.containers
Class Log4jTracingContainerDecorator

    java.lang.Object
      org.picocontainer.gems.containers.Log4jTracingContainerDecorator

All Implemented Interfaces:
  Serializable, org.picocontainer.Disposable, org.picocontainer.MutablePicoContainer, org.picocontainer.PicoContainer, org.picocontainer.Startable

Deprecated. Since PicoContainer 2.3, Pico 2 ComponentAdapters can now do everything that this decorator provided.

    @Deprecated
    public class Log4jTracingContainerDecorator

extends Object
implements org.picocontainer.MutablePicoContainer, Serializable

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())

Author:
  Michael Rimov
See Also:
  Serialized Form

Constructor Summary
`Log4jTracingContainerDecorator(org.picocontainer.MutablePicoContainer delegate)` Deprecated. Default typical wrapper that wraps another MutablePicoContainer.
`Log4jTracingContainerDecorator(org.picocontainer.MutablePicoContainer delegate, org.apache.log4j.Logger logger)` Deprecated. Alternate constructor that allows specification of the Logger to use.

Method Summary
`void` | `accept(org.picocontainer.PicoVisitor visitor)` Deprecated.
`org.picocontainer.MutablePicoContainer` | `addAdapter(org.picocontainer.ComponentAdapter componentAdapter)` Deprecated.
`org.picocontainer.MutablePicoContainer` | `addChildContainer(org.picocontainer.PicoContainer child)` Deprecated.
`org.picocontainer.MutablePicoContainer` | `addComponent(Object implOrInstance)` Deprecated.
`org.picocontainer.MutablePicoContainer` | `addComponent(Object componentKey, Object componentImplementationOrInstance, org.picocontainer.Parameter... parameters)` Deprecated.
`org.picocontainer.MutablePicoContainer` | `addConfig(String name, Object val)` Deprecated.
`org.picocontainer.MutablePicoContainer` | `as(Properties... properties)` Deprecated.
`org.picocontainer.MutablePicoContainer` | `change(Properties... properties)` Deprecated.
`void` | `dispose()` Deprecated.
`
`<T> T`
` | `getComponent(Class<T> componentType)` Deprecated.
`
`<T> T`
` | `getComponent(Class<T> componentType, Class<? extends Annotation> binding)` Deprecated.
`Object` | `getComponent(Object componentKeyOrType)` Deprecated.
`Object` | `getComponent(Object componentKeyOrType, Type into)` Deprecated.
`
`<T> org.picocontainer.ComponentAdapter<T>`
` | `getComponentAdapter(Class<T> componentType, Class<? extends Annotation> binding)` Deprecated.
`
`<T> org.picocontainer.ComponentAdapter<T>`
` | `getComponentAdapter(Class<T> componentType, org.picocontainer.NameBinding componentNameBinding)` Deprecated.
`org.picocontainer.ComponentAdapter<?>` | `getComponentAdapter(Object componentKey)` Deprecated.
`Collection<org.picocontainer.ComponentAdapter<?>>` | `getComponentAdapters()` Deprecated.
`
`<T> List<org.picocontainer.ComponentAdapter<T>>`
` | `getComponentAdapters(Class<T> componentType)` Deprecated.
`
`<T> List<org.picocontainer.ComponentAdapter<T>>`
` | `getComponentAdapters(Class<T> componentType, Class<? extends Annotation> binding)` Deprecated.
`List` | `getComponents()` Deprecated.
`
`<T> List<T>`
` | `getComponents(Class<T> componentType)` Deprecated.
`org.apache.log4j.Logger` | `getLoggerUsed()` Deprecated. Retrieves the logger instance used by this decorator.
`org.picocontainer.PicoContainer` | `getParent()` Deprecated.
`org.picocontainer.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(org.picocontainer.PicoContainer child)` Deprecated.
`org.picocontainer.ComponentAdapter` | `removeComponent(Object componentKey)` Deprecated.
`org.picocontainer.ComponentAdapter` | `removeComponentByInstance(Object componentInstance)` 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

### Log4jTracingContainerDecorator

    public Log4jTracingContainerDecorator(org.picocontainer.MutablePicoContainer delegate)

  Deprecated.
  Default typical wrapper that wraps another MutablePicoContainer.

  Parameters:
    `delegate` - Container to be decorated.
  Throws:
    `NullPointerException` - if delegate is null.

### Log4jTracingContainerDecorator

    public Log4jTracingContainerDecorator(org.picocontainer.MutablePicoContainer delegate,
                                          org.apache.log4j.Logger logger)

  Deprecated.
  Alternate constructor that allows specification of the Logger to use.

  Parameters:
    `delegate` - Container to be decorated.
    `logger` - specific Log4j Logger to use.
  Throws:
    `NullPointerException` - if delegate or logger is null.

Method Detail

### onKeyOrTypeDoesNotExistInContainer

    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.

  Parameters:
    `componentKeyOrType` - Component key that does not exist
    `target` - Logger to log into

### accept

    public void accept(org.picocontainer.PicoVisitor visitor)

  Deprecated.

  Specified by:
    `accept` in interface `org.picocontainer.PicoContainer`
  Parameters:
    `visitor` -
  See Also:
    `PicoContainer.accept(org.picocontainer.PicoVisitor)`

### addChildContainer

    public org.picocontainer.MutablePicoContainer addChildContainer(org.picocontainer.PicoContainer child)

  Deprecated.

  Specified by:
    `addChildContainer` in interface `org.picocontainer.MutablePicoContainer`
  Parameters:
    `child` -
  Returns:
  See Also:
    `MutablePicoContainer.addChildContainer(org.picocontainer.PicoContainer)`

### dispose

    public void dispose()

  Deprecated.

  Specified by:
    `dispose` in interface `org.picocontainer.Disposable`
  See Also:
    `Disposable.dispose()`

### getComponentAdapter

    public org.picocontainer.ComponentAdapter<?> getComponentAdapter(Object componentKey)

  Deprecated.

  Specified by:
    `getComponentAdapter` in interface `org.picocontainer.PicoContainer`
  Parameters:
    `componentKey` -
  Returns:
  See Also:
    `PicoContainer.getComponentAdapter(java.lang.Object)`

### getComponentAdapter

    public <T> org.picocontainer.ComponentAdapter<T> getComponentAdapter(Class<T> componentType,
                                                                         org.picocontainer.NameBinding componentNameBinding)

  Deprecated.

  Specified by:
    `getComponentAdapter` in interface `org.picocontainer.PicoContainer`
  Parameters:
    `componentType` -
  Returns:
    ComponentAdapter or null.
  See Also:
    `org.picocontainer.PicoContainer#getComponentAdapter(java.lang.Class)`

### getComponentAdapters

    public Collection<org.picocontainer.ComponentAdapter<?>> getComponentAdapters()

  Deprecated.

  Specified by:
    `getComponentAdapters` in interface `org.picocontainer.PicoContainer`
  Returns:
    Collection or null.
  See Also:
    `PicoContainer.getComponentAdapters()`

### getComponentAdapters

    public <T> List<org.picocontainer.ComponentAdapter<T>> getComponentAdapters(Class<T> componentType)

  Deprecated.

  Specified by:
    `getComponentAdapters` in interface `org.picocontainer.PicoContainer`
  Parameters:
    `componentType` -
  Returns:
    List of ComponentAdapters
  See Also:
    `PicoContainer.getComponentAdapters(java.lang.Class)`

### getComponentAdapters

    public <T> List<org.picocontainer.ComponentAdapter<T>> getComponentAdapters(Class<T> componentType,
                                                                                Class<? extends Annotation> binding)

  Deprecated.
  Specified by:
    `getComponentAdapters` in interface `org.picocontainer.PicoContainer`

### getComponentAdapter

    public <T> org.picocontainer.ComponentAdapter<T> getComponentAdapter(Class<T> componentType,
                                                                         Class<? extends Annotation> binding)

  Deprecated.
  Specified by:
    `getComponentAdapter` in interface `org.picocontainer.PicoContainer`

### getComponent

    public Object getComponent(Object componentKeyOrType)

  Deprecated.

  Specified by:
    `getComponent` in interface `org.picocontainer.PicoContainer`
  Parameters:
    `componentKeyOrType` -
  Returns:
  See Also:
    `PicoContainer.getComponent(java.lang.Object)`

### getComponent

    public Object getComponent(Object componentKeyOrType,
                               Type into)

  Deprecated.
  Specified by:
    `getComponent` in interface `org.picocontainer.PicoContainer`

### getComponent

    public <T> T getComponent(Class<T> componentType)

  Deprecated.
  Specified by:
    `getComponent` in interface `org.picocontainer.PicoContainer`

### getComponent

    public <T> T getComponent(Class<T> componentType,
                              Class<? extends Annotation> binding)

  Deprecated.
  Specified by:
    `getComponent` in interface `org.picocontainer.PicoContainer`

### getComponents

    public List getComponents()

  Deprecated.

  Specified by:
    `getComponents` in interface `org.picocontainer.PicoContainer`
  Returns:
  See Also:
    `PicoContainer.getComponents()`

### getComponents

    public <T> List<T> getComponents(Class<T> componentType)

  Deprecated.

  Specified by:
    `getComponents` in interface `org.picocontainer.PicoContainer`
  Parameters:
    `componentType` -
  Returns:
  See Also:
    `PicoContainer.getComponents(java.lang.Class)`

### getParent

    public org.picocontainer.PicoContainer getParent()

  Deprecated.

  Specified by:
    `getParent` in interface `org.picocontainer.PicoContainer`
  Returns:
  See Also:
    `PicoContainer.getParent()`

### makeChildContainer

    public org.picocontainer.MutablePicoContainer makeChildContainer()

  Deprecated.

  Specified by:
    `makeChildContainer` in interface `org.picocontainer.MutablePicoContainer`
  Returns:
  See Also:
    `MutablePicoContainer.makeChildContainer()`

### addAdapter

    public org.picocontainer.MutablePicoContainer addAdapter(org.picocontainer.ComponentAdapter componentAdapter)

  Deprecated.

  Specified by:
    `addAdapter` in interface `org.picocontainer.MutablePicoContainer`
  Parameters:
    `componentAdapter` -
  Returns:
  See Also:
    `MutablePicoContainer.addAdapter(org.picocontainer.ComponentAdapter)`

### addComponent

    public org.picocontainer.MutablePicoContainer addComponent(Object componentKey,
                                                               Object componentImplementationOrInstance,
                                                               org.picocontainer.Parameter... parameters)

  Deprecated.

  Specified by:
    `addComponent` in interface `org.picocontainer.MutablePicoContainer`
  Parameters:
    `componentKey` -
    `componentImplementationOrInstance` -
    `parameters` -
  Returns:

### addComponent

    public org.picocontainer.MutablePicoContainer addComponent(Object implOrInstance)

  Deprecated.

  Specified by:
    `addComponent` in interface `org.picocontainer.MutablePicoContainer`
  Parameters:
    `implOrInstance` -
  Returns:
  See Also:
    `MutablePicoContainer.addComponent(java.lang.Object)`

### addConfig

    public org.picocontainer.MutablePicoContainer addConfig(String name,
                                                            Object val)

  Deprecated.
  Specified by:
    `addConfig` in interface `org.picocontainer.MutablePicoContainer`

### removeChildContainer

    public boolean removeChildContainer(org.picocontainer.PicoContainer child)

  Deprecated.

  Specified by:
    `removeChildContainer` in interface `org.picocontainer.MutablePicoContainer`
  Parameters:
    `child` -
  Returns:
  See Also:
    `MutablePicoContainer.removeChildContainer(org.picocontainer.PicoContainer)`

### start

    public void start()

  Deprecated.

  Specified by:
    `start` in interface `org.picocontainer.Startable`
  See Also:
    `Startable.start()`

### stop

    public void stop()

  Deprecated.

  Specified by:
    `stop` in interface `org.picocontainer.Startable`
  See Also:
    `Startable.stop()`

### removeComponent

    public org.picocontainer.ComponentAdapter removeComponent(Object componentKey)

  Deprecated.

  Specified by:
    `removeComponent` in interface `org.picocontainer.MutablePicoContainer`
  Parameters:
    `componentKey` -
  Returns:
  See Also:
    `MutablePicoContainer.removeComponent(java.lang.Object)`

### removeComponentByInstance

    public org.picocontainer.ComponentAdapter removeComponentByInstance(Object componentInstance)

  Deprecated.

  Specified by:
    `removeComponentByInstance` in interface `org.picocontainer.MutablePicoContainer`
  Parameters:
    `componentInstance` -
  Returns:
  See Also:
    `MutablePicoContainer.removeComponentByInstance(java.lang.Object)`

### getLoggerUsed

    public org.apache.log4j.Logger getLoggerUsed()

  Deprecated.
  Retrieves the logger instance used by this decorator.

  Returns:
    Logger instance.

### change

    public org.picocontainer.MutablePicoContainer change(Properties... properties)

  Deprecated.
  Specified by:
    `change` in interface `org.picocontainer.MutablePicoContainer`

### as

    public org.picocontainer.MutablePicoContainer as(Properties... properties)

  Deprecated.
  Specified by:
    `as` in interface `org.picocontainer.MutablePicoContainer`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003-2009 Codehaus. All Rights Reserved.