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

📄 accountinfoseqhelper.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::AccountInfoSeq
 * <li> <b>Repository Id</b> IDL:Bank/AccountInfoSeq:1.0
 * </ul>
 * <b>IDL definition:</b>
 * <pre>
 * typedef sequence&ltBank.AccountInfo&gt AccountInfoSeq;
 * </pre>
 */
public final class AccountInfoSeqHelper {
  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.AccountInfo[] read (final org.omg.CORBA.portable.InputStream _input) {
    Bank.AccountInfo[] result;
    final int $length0 = _input.read_long();
    result = new Bank.AccountInfo[$length0];
    for (int $counter1 = 0; $counter1 < $length0; $counter1++) {
      result[$counter1] = Bank.AccountInfoHelper.read(_input);
    }
    return result;
  }

  public static void write (final org.omg.CORBA.portable.OutputStream _output, final Bank.AccountInfo[] _vis_value) {
    _output.write_long(_vis_value.length);
    for (int $counter2 = 0;  $counter2 < _vis_value.length; $counter2++) {
      Bank.AccountInfoHelper.write(_output, _vis_value[$counter2]);
    }
  }

  public static void insert (final org.omg.CORBA.Any any, final Bank.AccountInfo[] _vis_value) {
    any.type(Bank.AccountInfoSeqHelper.type());
    any.insert_Streamable(new Bank.AccountInfoSeqHolder(_vis_value));
  }

  public static Bank.AccountInfo[] extract (final org.omg.CORBA.Any any) {
    Bank.AccountInfo[] _vis_value;
    if (any instanceof com.inprise.vbroker.CORBA.Any) {
      Bank.AccountInfoSeqHolder _vis_holder = new Bank.AccountInfoSeqHolder();
      ((com.inprise.vbroker.CORBA.Any)any).extract_Streamable(_vis_holder);
      _vis_value = _vis_holder.value;
    } else {
      _vis_value = Bank.AccountInfoSeqHelper.read(any.create_input_stream());
    }
    return _vis_value;
  }

  public static org.omg.CORBA.TypeCode type () {
    if (_type == null) {
      synchronized (org.omg.CORBA.TypeCode.class) {
        if (_type == null) {
          org.omg.CORBA.TypeCode originalType = _orb().create_sequence_tc(0, Bank.AccountInfoHelper.type());
          _type = _orb().create_alias_tc(id(), "AccountInfoSeq", originalType);
        }
      }
    }
    return _type;
  }

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

⌨️ 快捷键说明

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