|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ProxyManager
The proxy manager service allows clients to generate and manage proxies.
Method Summary | |
---|---|
Object |
createDelegatingInterceptingProxy(org.osgi.framework.Bundle clientBundle,
Collection<Class<?>> classes,
Callable<Object> dispatcher,
Object template,
InvocationListener wrapper)
Creates a single proxy that both delegates and intercepts. |
Object |
createDelegatingProxy(org.osgi.framework.Bundle clientBundle,
Collection<Class<?>> classes,
Callable<Object> dispatcher,
Object template)
Create a proxy that delegates to an object instance which may change over time |
Object |
createInterceptingProxy(org.osgi.framework.Bundle clientBundle,
Collection<Class<?>> classes,
Object delegate,
InvocationListener wrapper)
Creates a proxy that invokes the supplied InvocationListener
immediately before and after any non-private method is called. |
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 |
---|
Object createDelegatingProxy(org.osgi.framework.Bundle clientBundle, Collection<Class<?>> classes, Callable<Object> dispatcher, Object template) throws UnableToProxyException
clientBundle
- The bundle providing the class to be proxiedclasses
- The interfaces and/or classes to be proxieddispatcher
- A Callable
that will called each time the proxy
is invoked to locate the object to delegate totemplate
- A template object for the proxy, may be null if only interfaces
need to be proxied. Supplying a templates typically offer a
significant performance boost to the resulting proxy.
UnableToProxyException
Object createInterceptingProxy(org.osgi.framework.Bundle clientBundle, Collection<Class<?>> classes, Object delegate, InvocationListener wrapper) throws UnableToProxyException
InvocationListener
immediately before and after any non-private method is called.
clientBundle
- classes
- delegate
- wrapper
-
UnableToProxyException
Object createDelegatingInterceptingProxy(org.osgi.framework.Bundle clientBundle, Collection<Class<?>> classes, Callable<Object> dispatcher, Object template, InvocationListener wrapper) throws UnableToProxyException
#createDelegatingProxy(Bundle, Collection, Callable)
and {ProxyManagercreateInterceptingProxy(Bundle, Collection, Object, InvocationListener)
clientBundle
- classes
- dispatcher
- template
- A template object for the proxy, may be null if only interfaces
need to be proxied. Supplying a templates typically offer a
significant performance boost to the resulting proxy.wrapper
-
UnableToProxyException
Callable<Object> unwrap(Object proxy)
proxy
- the proxy to unwrap.
boolean isProxy(Object proxy)
ProxyManager#createDelegatingProxy(Bundle,Collection,Callable)
for details on how to create a proxy.
proxy
- The proxy object to test
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |