org.picocontainer.defaults
Class ThreadLocalComponentAdapter

java.lang.Object
  extended byorg.picocontainer.defaults.DecoratingComponentAdapter
      extended byorg.picocontainer.defaults.ThreadLocalComponentAdapter
All Implemented Interfaces:
ComponentAdapter, Serializable

public class ThreadLocalComponentAdapter
extends DecoratingComponentAdapter

A ComponentAdapterthat realizes a ThreadLocalcomponent * instance. The adapter creates proxy instances, that will create the necessary * instances on-the-fly invoking the methods of the instance. * * * IMPORTANT! This class will be moved out of the PicoContainer core * before release of the final version! * * * @author Jörg Schaible

See Also:
Serialized Form

Constructor Summary
ThreadLocalComponentAdapter(ComponentAdapter delegate)
          Construct a ThreadLocalComponentAdapter.
 
Method Summary
 Object getComponentInstance()
          Retrieve the component instance.
 
Methods inherited from class org.picocontainer.defaults.DecoratingComponentAdapter
getComponentImplementation, getComponentKey, getContainer, getDelegate, setContainer, verify
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ThreadLocalComponentAdapter

public ThreadLocalComponentAdapter(ComponentAdapter delegate)
Construct a ThreadLocalComponentAdapter. * @param delegate The ComponentAdapterto delegate.

Method Detail

getComponentInstance

public Object getComponentInstance()
                            throws PicoInitializationException,
                                   PicoIntrospectionException,
                                   AssignabilityRegistrationException,
                                   NotConcreteRegistrationException
Description copied from interface: ComponentAdapter
Retrieve the component instance. This method will usually create a new instance each time it is called, but that is not required. For example, CachingComponentAdapter will always return the same instance.

Specified by:
getComponentInstance in interface ComponentAdapter
Overrides:
getComponentInstance in class DecoratingComponentAdapter
Throws:
PicoInitializationException
PicoIntrospectionException
AssignabilityRegistrationException
NotConcreteRegistrationException
See Also:
ComponentAdapter.getComponentInstance()


Copyright © 2003-2004 Codehaus. All Rights Reserved.