org.apache.aries.proxy
Interface ProxyManager


public interface ProxyManager

The proxy manager service allows clients to generate and manage proxies.


Method Summary
 Object createProxy(Bundle clientBundle, Collection<Class<?>> classes, Callable<Object> dispatcher)
           
 Object createProxy(Bundle clientBundle, Collection<Class<?>> classes, Callable<Object> dispatcher, InvocationHandlerWrapper wrapper)
           
 boolean isProxy(Object proxy)
          Returns true if and only if the specified object was generated by the ProxyManager.
 Callable<Object> unwrap(Object proxy)
          This method unwraps the provided proxy returning the target object.
 

Method Detail

createProxy

Object createProxy(Bundle clientBundle,
                   Collection<Class<?>> classes,
                   Callable<Object> dispatcher)
                   throws UnableToProxyException
Throws:
UnableToProxyException

createProxy

Object createProxy(Bundle clientBundle,
                   Collection<Class<?>> classes,
                   Callable<Object> dispatcher,
                   InvocationHandlerWrapper wrapper)
                   throws UnableToProxyException
Throws:
UnableToProxyException

unwrap

Callable<Object> unwrap(Object proxy)
This method unwraps the provided proxy returning the target object.

Parameters:
proxy - the proxy to unwrap.
Returns:
the target object.

isProxy

boolean isProxy(Object proxy)
Returns true if and only if the specified object was generated by the ProxyManager. See createProxy(Bundle,Collection,Callable) for details on how to create a proxy.

Parameters:
proxy - The proxy object to test
Returns:
true if it is a proxy, false otherwise.


Copyright © 2009-2011 The Apache Software Foundation. All Rights Reserved.