org.picocontainer.defaults
Class SynchronizedComponentAdapter
java.lang.Object
org.picocontainer.defaults.DecoratingComponentAdapter
org.picocontainer.defaults.SynchronizedComponentAdapter
- All Implemented Interfaces:
- Serializable, ComponentAdapter, ComponentMonitorStrategy, LifecycleStrategy, LifecycleManager
public class SynchronizedComponentAdapter
- extends DecoratingComponentAdapter
- Version:
- $Revision: 1600 $
- Author:
- Aslak Hellesøy, Manish Shah
- See Also:
- Serialized Form
Methods inherited from class org.picocontainer.defaults.DecoratingComponentAdapter |
accept, changeMonitor, currentMonitor, dispose, dispose, getComponentImplementation, getComponentKey, getDelegate, hasLifecycle, hasLifecycle, start, start, stop, stop, toString, verify |
SynchronizedComponentAdapter
public SynchronizedComponentAdapter(ComponentAdapter delegate)
getComponentInstance
public 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.
Copyright © 2003-2010 Codehaus. All Rights Reserved.