org.picocontainer.defaults
Class SynchronizedComponentAdapter

java.lang.Object
  extended by org.picocontainer.defaults.DecoratingComponentAdapter
      extended by org.picocontainer.defaults.SynchronizedComponentAdapter
All Implemented Interfaces:
java.io.Serializable, ComponentAdapter, ComponentMonitorStrategy, LifecycleStrategy, LifecycleManager

public class SynchronizedComponentAdapter
extends DecoratingComponentAdapter

Version:
$Revision: 1600 $
Author:
Aslak Hellesøy, Manish Shah
See Also:
Serialized Form

Constructor Summary
SynchronizedComponentAdapter(ComponentAdapter delegate)
           
 
Method Summary
 java.lang.Object getComponentInstance(PicoContainer container)
          Retrieve the component instance.
 
Methods inherited from class org.picocontainer.defaults.DecoratingComponentAdapter
accept, changeMonitor, currentMonitor, dispose, dispose, getComponentImplementation, getComponentKey, getDelegate, hasLifecycle, hasLifecycle, start, start, stop, stop, toString, verify
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SynchronizedComponentAdapter

public SynchronizedComponentAdapter(ComponentAdapter delegate)
Method Detail

getComponentInstance

public java.lang.Object getComponentInstance(PicoContainer container)
                                      throws PicoInitializationException,
                                             PicoIntrospectionException
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
Parameters:
container - the PicoContainer, that is used to resolve any possible dependencies of the instance.
Returns:
the component instance.
Throws:
PicoInitializationException - if the component could not be instantiated.
PicoIntrospectionException - if the component has dependencies which could not be resolved, or instantiation of the component lead to an ambigous situation within the container.