⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cartpoainvokehandler.java

📁 EJB 实例
💻 JAVA
字号:
package ejb;

public class CartPOAInvokeHandler extends ejb.CartPOA {
  private com.inprise.vbroker.rmi.CORBA.InvocationTarget _target;
  private static java.lang.reflect.Method _MethodPtrs[];
  private static void initMethodPointers () {
    try {
      _MethodPtrs = new java.lang.reflect.Method[] {
        ejb.Cart.class.getDeclaredMethod("removeItem", new Class[]{ejb.Item.class}),
        ejb.Cart.class.getDeclaredMethod("add", new Class[]{ejb.Item.class}),
        ejb.Cart.class.getDeclaredMethod("purchase", new Class[]{}),
        ejb.Cart.class.getDeclaredMethod("getContents", new Class[]{}),
        ejb.Cart.class.getDeclaredMethod("getTotalPrice", new Class[]{}),
      };
    }
    catch (Exception e) {
      throw new Error(e.getMessage());
    }
  }
  static {initMethodPointers();}

  public CartPOAInvokeHandler (final com.inprise.vbroker.rmi.CORBA.InvocationTarget target) {
    this._target = target;
  }

  public com.inprise.vbroker.rmi.CORBA.InvocationTarget target () {
    return this._target;
  }

  public void target (final com.inprise.vbroker.rmi.CORBA.InvocationTarget target) {
    this._target = target;
  }

  public static void removeItem (com.inprise.vbroker.rmi.CORBA.InvocationTarget _target,
                                 ejb.Item arg0)
    throws java.rmi.RemoteException {
    java.lang.Object[] _args = {arg0};
    try {
      _target.invoke(_MethodPtrs[0], _args);
    }
    catch (java.lang.reflect.InvocationTargetException ite) {
      final java.lang.Throwable t = ite.getTargetException();
      if (t instanceof java.rmi.RemoteException) {
        throw (java.rmi.RemoteException)t;
      }
      throw new org.omg.CORBA.UNKNOWN(t.getMessage());
    }
  }
  public static void add (com.inprise.vbroker.rmi.CORBA.InvocationTarget _target,
                          ejb.Item arg0)
    throws java.rmi.RemoteException {
    java.lang.Object[] _args = {arg0};
    try {
      _target.invoke(_MethodPtrs[1], _args);
    }
    catch (java.lang.reflect.InvocationTargetException ite) {
      final java.lang.Throwable t = ite.getTargetException();
      if (t instanceof java.rmi.RemoteException) {
        throw (java.rmi.RemoteException)t;
      }
      throw new org.omg.CORBA.UNKNOWN(t.getMessage());
    }
  }
  public static void purchase (com.inprise.vbroker.rmi.CORBA.InvocationTarget _target)
    throws java.rmi.RemoteException {
    java.lang.Object[] _args = {};
    try {
      _target.invoke(_MethodPtrs[2], _args);
    }
    catch (java.lang.reflect.InvocationTargetException ite) {
      final java.lang.Throwable t = ite.getTargetException();
      if (t instanceof java.rmi.RemoteException) {
        throw (java.rmi.RemoteException)t;
      }
      throw new org.omg.CORBA.UNKNOWN(t.getMessage());
    }
  }
  public static java.util.List getContents (com.inprise.vbroker.rmi.CORBA.InvocationTarget _target)
    throws java.rmi.RemoteException {
    java.lang.Object[] _args = {};
    try {
      java.lang.Object _result = _target.invoke(_MethodPtrs[3], _args);
      return (java.util.List)_result;
    }
    catch (java.lang.reflect.InvocationTargetException ite) {
      final java.lang.Throwable t = ite.getTargetException();
      if (t instanceof java.rmi.RemoteException) {
        throw (java.rmi.RemoteException)t;
      }
      throw new org.omg.CORBA.UNKNOWN(t.getMessage());
    }
  }
  public static float getTotalPrice (com.inprise.vbroker.rmi.CORBA.InvocationTarget _target)
    throws java.rmi.RemoteException {
    java.lang.Object[] _args = {};
    try {
      java.lang.Object _result = _target.invoke(_MethodPtrs[4], _args);
      return ((java.lang.Float)_result).floatValue();
    }
    catch (java.lang.reflect.InvocationTargetException ite) {
      final java.lang.Throwable t = ite.getTargetException();
      if (t instanceof java.rmi.RemoteException) {
        throw (java.rmi.RemoteException)t;
      }
      throw new org.omg.CORBA.UNKNOWN(t.getMessage());
    }
  }

  public void removeItem (ejb.Item arg0)
    throws java.rmi.RemoteException {
    ejb.CartPOAInvokeHandler.removeItem(_target, arg0);
  }
  public void add (ejb.Item arg0)
    throws java.rmi.RemoteException {
    ejb.CartPOAInvokeHandler.add(_target, arg0);
  }
  public void purchase ()
    throws java.rmi.RemoteException {
    ejb.CartPOAInvokeHandler.purchase(_target);
  }
  public java.util.List getContents ()
    throws java.rmi.RemoteException {
    return ejb.CartPOAInvokeHandler.getContents(_target);
  }
  public float getTotalPrice ()
    throws java.rmi.RemoteException {
    return ejb.CartPOAInvokeHandler.getTotalPrice(_target);
  }
  public boolean isIdentical (javax.ejb.EJBObject arg0)
    throws java.rmi.RemoteException {
    return com.inprise.ejb.javax.ejb.EJBObjectPOAInvokeHandler.isIdentical(_target, arg0);
  }
  public void remove ()
    throws java.rmi.RemoteException, javax.ejb.RemoveException {
    com.inprise.ejb.javax.ejb.EJBObjectPOAInvokeHandler.remove(_target);
  }
  public javax.ejb.EJBHome getEJBHome ()
    throws java.rmi.RemoteException {
    return com.inprise.ejb.javax.ejb.EJBObjectPOAInvokeHandler.getEJBHome(_target);
  }
  public javax.ejb.Handle getHandle ()
    throws java.rmi.RemoteException {
    return com.inprise.ejb.javax.ejb.EJBObjectPOAInvokeHandler.getHandle(_target);
  }
  public java.lang.Object getPrimaryKey ()
    throws java.rmi.RemoteException {
    return com.inprise.ejb.javax.ejb.EJBObjectPOAInvokeHandler.getPrimaryKey(_target);
  }

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -