org.apache.aries.proxy.impl
Class AbstractProxyManager

java.lang.Object
  extended by org.apache.aries.proxy.impl.AbstractProxyManager
All Implemented Interfaces:
org.apache.aries.proxy.ProxyManager
Direct Known Subclasses:
AsmProxyManager, JdkProxyManager

public abstract class AbstractProxyManager
extends Object
implements org.apache.aries.proxy.ProxyManager


Constructor Summary
AbstractProxyManager()
           
 
Method Summary
 Object createDelegatingInterceptingProxy(org.osgi.framework.Bundle clientBundle, Collection<Class<?>> classes, Callable<Object> dispatcher, Object template, org.apache.aries.proxy.InvocationListener listener)
           
 Object createDelegatingProxy(org.osgi.framework.Bundle clientBundle, Collection<Class<?>> classes, Callable<Object> dispatcher, Object template)
           
 Object createInterceptingProxy(org.osgi.framework.Bundle clientBundle, Collection<Class<?>> classes, Object delegate, org.apache.aries.proxy.InvocationListener listener)
           
protected abstract  Object createNewProxy(org.osgi.framework.Bundle clientBundle, Collection<Class<?>> classes, Callable<Object> dispatcher, org.apache.aries.proxy.InvocationListener listener)
           
protected  ClassLoader getClassLoader(org.osgi.framework.Bundle clientBundle, Collection<Class<?>> classes)
           
protected abstract  InvocationHandler getInvocationHandler(Object proxy)
           
 boolean isProxy(Object proxy)
           
protected abstract  boolean isProxyClass(Class<?> clazz)
           
 Callable<Object> unwrap(Object proxy)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractProxyManager

public AbstractProxyManager()
Method Detail

createDelegatingProxy

public final Object createDelegatingProxy(org.osgi.framework.Bundle clientBundle,
                                          Collection<Class<?>> classes,
                                          Callable<Object> dispatcher,
                                          Object template)
                                   throws org.apache.aries.proxy.UnableToProxyException
Specified by:
createDelegatingProxy in interface org.apache.aries.proxy.ProxyManager
Throws:
org.apache.aries.proxy.UnableToProxyException

createInterceptingProxy

public Object createInterceptingProxy(org.osgi.framework.Bundle clientBundle,
                                      Collection<Class<?>> classes,
                                      Object delegate,
                                      org.apache.aries.proxy.InvocationListener listener)
                               throws org.apache.aries.proxy.UnableToProxyException
Specified by:
createInterceptingProxy in interface org.apache.aries.proxy.ProxyManager
Throws:
org.apache.aries.proxy.UnableToProxyException

createDelegatingInterceptingProxy

public final Object createDelegatingInterceptingProxy(org.osgi.framework.Bundle clientBundle,
                                                      Collection<Class<?>> classes,
                                                      Callable<Object> dispatcher,
                                                      Object template,
                                                      org.apache.aries.proxy.InvocationListener listener)
                                               throws org.apache.aries.proxy.UnableToProxyException
Specified by:
createDelegatingInterceptingProxy in interface org.apache.aries.proxy.ProxyManager
Throws:
org.apache.aries.proxy.UnableToProxyException

unwrap

public final Callable<Object> unwrap(Object proxy)
Specified by:
unwrap in interface org.apache.aries.proxy.ProxyManager

isProxy

public final boolean isProxy(Object proxy)
Specified by:
isProxy in interface org.apache.aries.proxy.ProxyManager

createNewProxy

protected abstract Object createNewProxy(org.osgi.framework.Bundle clientBundle,
                                         Collection<Class<?>> classes,
                                         Callable<Object> dispatcher,
                                         org.apache.aries.proxy.InvocationListener listener)
                                  throws org.apache.aries.proxy.UnableToProxyException
Throws:
org.apache.aries.proxy.UnableToProxyException

getInvocationHandler

protected abstract InvocationHandler getInvocationHandler(Object proxy)

isProxyClass

protected abstract boolean isProxyClass(Class<?> clazz)

getClassLoader

protected ClassLoader getClassLoader(org.osgi.framework.Bundle clientBundle,
                                     Collection<Class<?>> classes)


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