org.picocontainer.defaults
Interface Swappable


public interface Swappable

This interface is implemented by delegate proxies which support replacing the delegate object behind that proxy with a different instance. It is implemented by all proxy instances created by ImplementationHidingComponentAdapter. Please note that implementations of this method are not guaranteed to be safe for concurrent use.

Version:
$Revision: 1.5 $
Author:
Aslak Hellesøy

Method Summary
 Object hotswap(Object newDelegate)
          Swaps the delegate behind the proxy with a new instance.
 

Method Detail

hotswap

public Object hotswap(Object newDelegate)
Swaps the delegate behind the proxy with a new instance.

Parameters:
newDelegate - the new delegate to which the proxy will defer calls.
Returns:
the old delegate which has been replaced.


Copyright © 2003-2004 Codehaus. All Rights Reserved.