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

📄 accountiteratorhelper.java

📁 基于corba的资源池,实现了实例池供客户端调用,并且实例池对实例的分配采用策略模式支持随即抽取,最近使用和循环抽取三个不同策略.(在visibroke下面开发的)
💻 JAVA
字号:
package Bank;

/**
 * <ul>
 * <li> <b>IDL Source</b>    "D:/exp/NewWork/Exp6/src/Bank.idl"
 * <li> <b>IDL Name</b>      ::Bank::AccountIterator
 * <li> <b>Repository Id</b> IDL:Bank/AccountIterator:1.0
 * </ul>
 * <b>IDL definition:</b>
 * <pre>
 * interface AccountIterator {
  ...
};
 * </pre>
 */
public final class AccountIteratorHelper {
  public static Bank.AccountIterator narrow (final org.omg.CORBA.Object obj) {
    return narrow(obj, false);
  }

  public static Bank.AccountIterator unchecked_narrow (org.omg.CORBA.Object obj) {
    return narrow(obj, true);
  }

  private static Bank.AccountIterator narrow (final org.omg.CORBA.Object obj, final boolean is_a) {
    if (obj == null) {
      return null;
    }
    if (obj instanceof Bank.AccountIterator) {
      return (Bank.AccountIterator)obj;
    }
    if (is_a || obj._is_a(id())) {
      final org.omg.CORBA.portable.ObjectImpl _obj = (org.omg.CORBA.portable.ObjectImpl)obj;
      Bank._AccountIteratorStub result = new Bank._AccountIteratorStub();
      final org.omg.CORBA.portable.Delegate _delegate = _obj._get_delegate();
      result._set_delegate(_delegate);
      return result;
    }
    throw new org.omg.CORBA.BAD_PARAM();
  }

  public static Bank.AccountIterator bind (org.omg.CORBA.ORB orb) {
    return bind(orb, null, null, null);
  }

  public static Bank.AccountIterator bind (org.omg.CORBA.ORB orb, java.lang.String name) {
    return bind(orb, name, null, null);
  }

  public static Bank.AccountIterator bind (org.omg.CORBA.ORB orb,
                                           java.lang.String name,
                                           java.lang.String host,
                                           com.inprise.vbroker.CORBA.BindOptions _options) {
    if (!(orb instanceof com.inprise.vbroker.CORBA.ORB)) {
      throw new org.omg.CORBA.BAD_PARAM();
    }
    return narrow(((com.inprise.vbroker.CORBA.ORB)orb).bind(id(), name, host, _options), true);
  }

  public static Bank.AccountIterator bind (org.omg.CORBA.ORB orb, java.lang.String fullPoaName, byte[] oid) {
    return bind(orb, fullPoaName, oid, null, null);
  }

  public static Bank.AccountIterator bind (org.omg.CORBA.ORB orb,
                                           java.lang.String fullPoaName,
                                           byte[] oid, java.lang.String host,
                                           com.inprise.vbroker.CORBA.BindOptions _options) {
    if (!(orb instanceof com.inprise.vbroker.CORBA.ORB)) {
      throw new org.omg.CORBA.BAD_PARAM();
    }
    return narrow(((com.inprise.vbroker.CORBA.ORB)orb).bind(fullPoaName, oid, host, _options), true);
  }

  public java.lang.Object read_Object (final org.omg.CORBA.portable.InputStream istream) {
    return read(istream);
  }

  public void write_Object (final org.omg.CORBA.portable.OutputStream ostream, final java.lang.Object obj) {
    if (!(obj instanceof Bank.AccountIterator)) {
      throw new org.omg.CORBA.BAD_PARAM();
    }
    write(ostream, (Bank.AccountIterator)obj);
  }

  public java.lang.String get_id () {
    return id();
  }

  public org.omg.CORBA.TypeCode get_type () {
    return type();
  }

  private static org.omg.CORBA.TypeCode _type;
  private static boolean _initializing;

  private static org.omg.CORBA.ORB _orb () {
    return org.omg.CORBA.ORB.init();
  }

  public static Bank.AccountIterator read (final org.omg.CORBA.portable.InputStream _input) {
    return narrow(_input.read_Object(Bank._AccountIteratorStub.class), true);
  }

  public static void write (final org.omg.CORBA.portable.OutputStream _output, final Bank.AccountIterator _vis_value) {
    if (!(_output instanceof org.omg.CORBA_2_3.portable.OutputStream)) {
      throw new org.omg.CORBA.BAD_PARAM();
    }
    if (_vis_value != null && !(_vis_value instanceof org.omg.CORBA.portable.ObjectImpl)) {
      throw new org.omg.CORBA.BAD_PARAM();
    }
    _output.write_Object((org.omg.CORBA.Object)_vis_value);
  }

  public static void insert (final org.omg.CORBA.Any any, final Bank.AccountIterator _vis_value) {
    any.insert_Object((org.omg.CORBA.Object)_vis_value, Bank.AccountIteratorHelper.type());
  }

  public static Bank.AccountIterator extract (final org.omg.CORBA.Any any) {
    Bank.AccountIterator _vis_value;
    final org.omg.CORBA.Object _obj = any.extract_Object();
    _vis_value = Bank.AccountIteratorHelper.narrow(_obj);
    return _vis_value;
  }

  public static org.omg.CORBA.TypeCode type () {
    if (_type == null) {
      synchronized (org.omg.CORBA.TypeCode.class) {
        if (_type == null) {
          _type = _orb().create_interface_tc(id(), "AccountIterator");
        }
      }
    }
    return _type;
  }

  public static java.lang.String id () {
    return "IDL:Bank/AccountIterator:1.0";
  }
}

⌨️ 快捷键说明

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