FileDocCategorySizeDatePackage
StatefulHomeRemoteProxy.javaAPI DocJBoss 4.2.14206Fri Jul 13 20:53:50 BST 2007org.jboss.ejb3.stateful

StatefulHomeRemoteProxy

public class StatefulHomeRemoteProxy extends org.jboss.ejb3.session.BaseSessionRemoteProxy
Comment
author
Bill Burke
version
$Revision: 60233 $

Fields Summary
private static final long
serialVersionUID
private static final Logger
log
protected org.jboss.remoting.InvokerLocator
uri
private javax.ejb.HomeHandle
homeHandle
private javax.ejb.EJBMetaData
ejbMetaData
Constructors Summary
public StatefulHomeRemoteProxy(Object containerId, org.jboss.aop.advice.Interceptor[] interceptors, org.jboss.remoting.InvokerLocator uri)


         
   
      super(containerId, interceptors);
      this.uri = uri;
   
public StatefulHomeRemoteProxy(Object containerId, org.jboss.aop.advice.Interceptor[] interceptors, org.jboss.remoting.InvokerLocator uri, Object id)

      super(containerId, interceptors);
      this.uri = uri;
      this.id = id;
   
protected StatefulHomeRemoteProxy()

   
Methods Summary
public java.lang.ObjectgetAsynchronousProxy(java.lang.Object proxy)

      throw new RuntimeException("NOT IMPLEMENTED");
   
private java.lang.ObjecthandleEjb21CallLocally(java.lang.reflect.Method method, java.lang.Object[] args)

      if (method.equals(ProxyUtils.GET_HOME_HANDLE))
      {
         return homeHandle;
      }
      else if (method.equals(ProxyUtils.GET_EJB_METADATA))
      {
         return ejbMetaData;
      }

      return null;
   
public java.lang.Objectinvoke(java.lang.Object proxy, java.lang.reflect.Method method, java.lang.Object[] args)

      long hash = MethodHashing.calculateHash(method);
      Object ret = ProxyUtils.handleCallLocally(hash, proxy, this, method, args);
      if (ret != null)
      {
         return ret;
      }

      ret = handleEjb21CallLocally(method, args);
      if (ret != null)
      {
         return ret;
      }

      StatefulRemoteInvocation sri = new StatefulRemoteInvocation(interceptors, hash, method, method, null, null);
      sri.setArguments(args);
      sri.setInstanceResolver(metadata);
      sri.getMetaData().addMetaData(Dispatcher.DISPATCHER, Dispatcher.OID, containerId, PayloadKey.AS_IS);
      sri.getMetaData().addMetaData(InvokeRemoteInterceptor.REMOTING, InvokeRemoteInterceptor.INVOKER_LOCATOR, uri, PayloadKey.AS_IS);
      sri.getMetaData().addMetaData(InvokeRemoteInterceptor.REMOTING, InvokeRemoteInterceptor.SUBSYSTEM, "AOP", PayloadKey.AS_IS);

      return sri.invokeNext();
   
public voidsetEjbMetaData(javax.ejb.EJBMetaData ejbMetaData)

      this.ejbMetaData = ejbMetaData;
   
public voidsetHandle(StatefulHandleImpl handle)

      this.handle = handle;
      handle.id = id;
   
public voidsetHomeHandle(javax.ejb.HomeHandle homeHandle)

      this.homeHandle = homeHandle;
   
public java.lang.StringtoString()

      return containerId.toString() + ":Home";