org.picocontainer.gems.adapters
Class HotSwappingComponentAdapter

java.lang.Object
  extended byorg.picocontainer.defaults.DecoratingComponentAdapter
      extended byorg.picocontainer.gems.adapters.HotSwappingComponentAdapter
All Implemented Interfaces:
org.picocontainer.ComponentAdapter, org.picocontainer.defaults.ComponentMonitorStrategy, org.picocontainer.LifecycleManager, org.picocontainer.defaults.LifecycleStrategy, Serializable

public class HotSwappingComponentAdapter
extends org.picocontainer.defaults.DecoratingComponentAdapter

This component adapter makes it possible to hide the implementation of a real subject (behind a proxy). If the key of the component is of type Class and that class represents an interface, the proxy will only implement the interface represented by that Class. Otherwise (if the key is something else), the proxy will implement all the interfaces of the underlying subject. In any case, the proxy will also implement Swappable, making it possible to swap out the underlying subject at runtime.

Note that this class doesn't cache instances. If you want caching, use a CachingComponentAdapter around this one.

Version:
$Revision: 2631 $
Author:
Paul Hammant, Aslak Hellesøy
See Also:
Serialized Form

Constructor Summary
HotSwappingComponentAdapter(org.picocontainer.ComponentAdapter delegate)
           
HotSwappingComponentAdapter(org.picocontainer.ComponentAdapter delegate, ProxyFactory proxyFactory)
           
 
Method Summary
 Object getComponentInstance(org.picocontainer.PicoContainer container)
           
 
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

HotSwappingComponentAdapter

public HotSwappingComponentAdapter(org.picocontainer.ComponentAdapter delegate,
                                   ProxyFactory proxyFactory)

HotSwappingComponentAdapter

public HotSwappingComponentAdapter(org.picocontainer.ComponentAdapter delegate)
Method Detail

getComponentInstance

public Object getComponentInstance(org.picocontainer.PicoContainer container)


Copyright © 2003-2007 Codehaus. All Rights Reserved.