org.picocontainer.defaults
Class ThreadLocalComponentAdapter
java.lang.Object
org.picocontainer.defaults.DecoratingComponentAdapter
org.picocontainer.defaults.ThreadLocalComponentAdapter
- All Implemented Interfaces:
- ComponentAdapter, Serializable
- public class ThreadLocalComponentAdapter
- extends DecoratingComponentAdapter
A ComponentAdapter
that realizes a ThreadLocal
component
* 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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ThreadLocalComponentAdapter
public ThreadLocalComponentAdapter(ComponentAdapter delegate)
- Construct a ThreadLocalComponentAdapter.
* @param delegate The
ComponentAdapter
to delegate.
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.