public abstract class AbstractProxyManager extends Object implements ProxyManager
Constructor and Description |
---|
AbstractProxyManager() |
Modifier and Type | Method and Description |
---|---|
protected abstract Object |
createNewProxy(org.osgi.framework.Bundle clientBundle,
Collection<Class<?>> classes,
InvocationHandler ih) |
Object |
createProxy(org.osgi.framework.Bundle clientBundle,
Collection<Class<?>> classes,
Callable<Object> dispatcher) |
Object |
createProxy(org.osgi.framework.Bundle clientBundle,
Collection<Class<?>> classes,
Callable<Object> dispatcher,
InvocationHandlerWrapper wrapper) |
protected ClassLoader |
getClassLoader(org.osgi.framework.Bundle clientBundle,
Collection<Class<?>> classes) |
protected abstract InvocationHandler |
getInvocationHandler(Object proxy) |
boolean |
isProxy(Object proxy)
Returns true if and only if the specified object was generated by a ProxyFactory returned by
a call to
ProxyManager#createProxyFactory(boolean) . |
protected abstract boolean |
isProxyClass(Class<?> clazz) |
Callable<Object> |
unwrap(Object proxy)
This method unwraps the provided proxy returning the target object.
|
public final Object createProxy(org.osgi.framework.Bundle clientBundle, Collection<Class<?>> classes, Callable<Object> dispatcher) throws UnableToProxyException
createProxy
in interface ProxyManager
UnableToProxyException
public final Object createProxy(org.osgi.framework.Bundle clientBundle, Collection<Class<?>> classes, Callable<Object> dispatcher, InvocationHandlerWrapper wrapper) throws UnableToProxyException
createProxy
in interface ProxyManager
UnableToProxyException
public final Callable<Object> unwrap(Object proxy)
ProxyManager
unwrap
in interface ProxyManager
proxy
- the proxy to unwrap.public final boolean isProxy(Object proxy)
ProxyManager
ProxyManager#createProxyFactory(boolean)
.isProxy
in interface ProxyManager
proxy
- The proxy object to testprotected abstract Object createNewProxy(org.osgi.framework.Bundle clientBundle, Collection<Class<?>> classes, InvocationHandler ih) throws UnableToProxyException
UnableToProxyException
protected abstract InvocationHandler getInvocationHandler(Object proxy)
protected abstract boolean isProxyClass(Class<?> clazz)
protected ClassLoader getClassLoader(org.osgi.framework.Bundle clientBundle, Collection<Class<?>> classes)
Copyright © 2016. All rights reserved.