org.apache.geronimo.kernel.basic
Class BasicProxyManager

java.lang.Object
  extended by org.apache.geronimo.kernel.basic.BasicProxyManager
All Implemented Interfaces:
ProxyManager
Direct Known Subclasses:
JMXProxyManager

public class BasicProxyManager
extends Object
implements ProxyManager

Creates proxies that communicate directly with a Kernel located in the same JVM as the client.


Constructor Summary
BasicProxyManager(Kernel kernel)
           
 
Method Summary
 Object createProxy(AbstractName target, Class type)
           
 Object createProxy(AbstractName target, ClassLoader classLoader)
           
 ProxyFactory createProxyFactory(Class[] types, ClassLoader classLoader)
          Creates a proxy factory for GBeans which will implement the specified types.
 void destroyProxy(Object proxy)
          Cleans up and resources associated with the proxy
protected  void doDestroy(net.sf.cglib.proxy.MethodInterceptor methodInterceptor)
           
protected  AbstractName getAbstractName(net.sf.cglib.proxy.MethodInterceptor methodInterceptor)
           
protected  net.sf.cglib.proxy.Callback getMethodInterceptor(Class proxyType, Kernel kernel, AbstractName target)
           
 AbstractName getProxyTarget(Object proxy)
          Get the object name of the specified proxy TODO convert to abstractName
 boolean isProxy(Object proxy)
          Is the specified object a proxy
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicProxyManager

public BasicProxyManager(Kernel kernel)
Method Detail

createProxyFactory

public ProxyFactory createProxyFactory(Class[] types,
                                       ClassLoader classLoader)
Description copied from interface: ProxyManager
Creates a proxy factory for GBeans which will implement the specified types. The proxy class will be created within the specified class loader. All of the specified types must be visible from the class loader.

Specified by:
createProxyFactory in interface ProxyManager
Parameters:
types - the type of the proxies this factory should create
classLoader - the class loader in which the proxy class will be registered
Returns:
the proxy factory

createProxy

public Object createProxy(AbstractName target,
                          Class type)
Specified by:
createProxy in interface ProxyManager

createProxy

public Object createProxy(AbstractName target,
                          ClassLoader classLoader)
Specified by:
createProxy in interface ProxyManager

destroyProxy

public void destroyProxy(Object proxy)
Description copied from interface: ProxyManager
Cleans up and resources associated with the proxy

Specified by:
destroyProxy in interface ProxyManager
Parameters:
proxy - the proxy to destroy

isProxy

public boolean isProxy(Object proxy)
Description copied from interface: ProxyManager
Is the specified object a proxy

Specified by:
isProxy in interface ProxyManager
Parameters:
proxy - the object to determin if it is a proxy
Returns:
true if the object is a proxy

getProxyTarget

public AbstractName getProxyTarget(Object proxy)
Description copied from interface: ProxyManager
Get the object name of the specified proxy TODO convert to abstractName

Specified by:
getProxyTarget in interface ProxyManager
Parameters:
proxy - the proxy to get the target object name from
Returns:
the object name of the target

getMethodInterceptor

protected net.sf.cglib.proxy.Callback getMethodInterceptor(Class proxyType,
                                                           Kernel kernel,
                                                           AbstractName target)

doDestroy

protected void doDestroy(net.sf.cglib.proxy.MethodInterceptor methodInterceptor)

getAbstractName

protected AbstractName getAbstractName(net.sf.cglib.proxy.MethodInterceptor methodInterceptor)


Copyright © 2003-2007 Apache Software Foundation. All Rights Reserved.