FileDocCategorySizeDatePackage
EJBObjectInvocationHandlerDelegate.javaAPI DocGlassfish v2 API3535Fri May 04 22:32:58 BST 2007com.sun.ejb.containers

EJBObjectInvocationHandlerDelegate

public class EJBObjectInvocationHandlerDelegate extends Object implements InvocationHandler
This class is used as a "proxy" or adapter between the remote business interface proxy and the EJBObjectInvocationHandler. An instance of this class is created for each remote business interface of a bean. All java.lang.Object methods are handled by this InvocationHandler itself while the business interface methods are delegated to the delegate (which is the EJBObjectInvocaionHandler).
author
Kenneth Saks

Fields Summary
private Class
remoteBusinessIntfClass
private EJBObjectInvocationHandler
delegate
Constructors Summary
EJBObjectInvocationHandlerDelegate(Class intfClass, EJBObjectInvocationHandler delegate)

        this.remoteBusinessIntfClass = intfClass;
        this.delegate = delegate;
    
Methods Summary
public java.lang.Objectinvoke(java.lang.Object proxy, java.lang.reflect.Method method, java.lang.Object[] args)

        
        Class methodClass = method.getDeclaringClass();
        Object result = null;
        if( methodClass == java.lang.Object.class ) {
            result = InvocationHandlerUtil.invokeJavaObjectMethod
                (this, method, args);
        } else {
            result = delegate.invoke(remoteBusinessIntfClass, method, args);
        }
        
        return result;