org.apache.aries.proxy
Interface ProxyManager

All Known Implementing Classes:
AbstractProxyManager, AsmProxyManager, JdkProxyManager

public interface ProxyManager

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


Method Summary
 java.lang.Object createProxy(org.osgi.framework.Bundle clientBundle, java.util.Collection<java.lang.Class<?>> classes, java.util.concurrent.Callable<java.lang.Object> dispatcher)
           
 java.lang.Object createProxy(org.osgi.framework.Bundle clientBundle, java.util.Collection<java.lang.Class<?>> classes, java.util.concurrent.Callable<java.lang.Object> dispatcher, InvocationHandlerWrapper wrapper)
           
 boolean isProxy(java.lang.Object proxy)
          Returns true if and only if the specified object was generated by a ProxyFactory returned by a call to ProxyManager#createProxyFactory(boolean).
 java.util.concurrent.Callable<java.lang.Object> unwrap(java.lang.Object proxy)
          This method unwraps the provided proxy returning the target object.
 

Method Detail

createProxy

java.lang.Object createProxy(org.osgi.framework.Bundle clientBundle,
                             java.util.Collection<java.lang.Class<?>> classes,
                             java.util.concurrent.Callable<java.lang.Object> dispatcher)
                             throws UnableToProxyException
Throws:
UnableToProxyException

createProxy

java.lang.Object createProxy(org.osgi.framework.Bundle clientBundle,
                             java.util.Collection<java.lang.Class<?>> classes,
                             java.util.concurrent.Callable<java.lang.Object> dispatcher,
                             InvocationHandlerWrapper wrapper)
                             throws UnableToProxyException
Throws:
UnableToProxyException

unwrap

java.util.concurrent.Callable<java.lang.Object> unwrap(java.lang.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(java.lang.Object proxy)
Returns true if and only if the specified object was generated by a ProxyFactory returned by a call to ProxyManager#createProxyFactory(boolean).

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.