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

📄 _accountiteratorstub.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 class _AccountIteratorStub extends com.inprise.vbroker.CORBA.portable.ObjectImpl implements Bank.AccountIterator {
  final public static java.lang.Class _opsClass = Bank.AccountIteratorOperations.class;

  public java.lang.String[] _ids () {
    return __ids;
  }

  private static java.lang.String[] __ids = {
    "IDL:Bank/AccountIterator:1.0"
  };

  /**
   * <pre>
   *   boolean hasNext ();
   * </pre>
   */
  public boolean hasNext () {

    while (true) {
      if (!_is_local()) {
        org.omg.CORBA.portable.OutputStream _output = null;
        org.omg.CORBA.portable.InputStream  _input  = null;
        boolean _result;
        try {
          _output = this._request("hasNext", true);
          _input = this._invoke(_output);
          _result = _input.read_boolean();
          return _result;
        }
        catch (org.omg.CORBA.portable.ApplicationException _exception) {
          final org.omg.CORBA.portable.InputStream in = _exception.getInputStream();
          java.lang.String _exception_id = _exception.getId();
          throw new org.omg.CORBA.UNKNOWN("Unexpected User Exception: " + _exception_id);
        }
        catch (org.omg.CORBA.portable.RemarshalException _exception) {
          continue;
        }
        finally {
          this._releaseReply(_input);
        }
      } else {
        final org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke("hasNext", _opsClass);
        if (_so == null) {
          continue;
        }
        final Bank.AccountIteratorOperations _self = (Bank.AccountIteratorOperations)_so.servant;
        try {
          return _self.hasNext();
        }
        finally {
          _servant_postinvoke(_so);
        }
      }
    }
  }

  /**
   * <pre>
   *   boolean hasPre ();
   * </pre>
   */
  public boolean hasPre () {

    while (true) {
      if (!_is_local()) {
        org.omg.CORBA.portable.OutputStream _output = null;
        org.omg.CORBA.portable.InputStream  _input  = null;
        boolean _result;
        try {
          _output = this._request("hasPre", true);
          _input = this._invoke(_output);
          _result = _input.read_boolean();
          return _result;
        }
        catch (org.omg.CORBA.portable.ApplicationException _exception) {
          final org.omg.CORBA.portable.InputStream in = _exception.getInputStream();
          java.lang.String _exception_id = _exception.getId();
          throw new org.omg.CORBA.UNKNOWN("Unexpected User Exception: " + _exception_id);
        }
        catch (org.omg.CORBA.portable.RemarshalException _exception) {
          continue;
        }
        finally {
          this._releaseReply(_input);
        }
      } else {
        final org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke("hasPre", _opsClass);
        if (_so == null) {
          continue;
        }
        final Bank.AccountIteratorOperations _self = (Bank.AccountIteratorOperations)_so.servant;
        try {
          return _self.hasPre();
        }
        finally {
          _servant_postinvoke(_so);
        }
      }
    }
  }

  /**
   * <pre>
   *   Bank.AccountInfoSeq next (in string sql);
   * </pre>
   */
  public Bank.AccountInfo[] next (java.lang.String sql) {

    while (true) {
      if (!_is_local()) {
        org.omg.CORBA.portable.OutputStream _output = null;
        org.omg.CORBA.portable.InputStream  _input  = null;
        Bank.AccountInfo[] _result;
        try {
          _output = this._request("next", true);
          _output.write_string((java.lang.String)sql);
          _input = this._invoke(_output);
          _result = Bank.AccountInfoSeqHelper.read(_input);
          return _result;
        }
        catch (org.omg.CORBA.portable.ApplicationException _exception) {
          final org.omg.CORBA.portable.InputStream in = _exception.getInputStream();
          java.lang.String _exception_id = _exception.getId();
          throw new org.omg.CORBA.UNKNOWN("Unexpected User Exception: " + _exception_id);
        }
        catch (org.omg.CORBA.portable.RemarshalException _exception) {
          continue;
        }
        finally {
          this._releaseReply(_input);
        }
      } else {
        final org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke("next", _opsClass);
        if (_so == null) {
          continue;
        }
        final Bank.AccountIteratorOperations _self = (Bank.AccountIteratorOperations)_so.servant;
        try {
          return _self.next(sql);
        }
        finally {
          _servant_postinvoke(_so);
        }
      }
    }
  }

  /**
   * <pre>
   *   Bank.AccountInfoSeq pre ();
   * </pre>
   */
  public Bank.AccountInfo[] pre () {

    while (true) {
      if (!_is_local()) {
        org.omg.CORBA.portable.OutputStream _output = null;
        org.omg.CORBA.portable.InputStream  _input  = null;
        Bank.AccountInfo[] _result;
        try {
          _output = this._request("pre", true);
          _input = this._invoke(_output);
          _result = Bank.AccountInfoSeqHelper.read(_input);
          return _result;
        }
        catch (org.omg.CORBA.portable.ApplicationException _exception) {
          final org.omg.CORBA.portable.InputStream in = _exception.getInputStream();
          java.lang.String _exception_id = _exception.getId();
          throw new org.omg.CORBA.UNKNOWN("Unexpected User Exception: " + _exception_id);
        }
        catch (org.omg.CORBA.portable.RemarshalException _exception) {
          continue;
        }
        finally {
          this._releaseReply(_input);
        }
      } else {
        final org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke("pre", _opsClass);
        if (_so == null) {
          continue;
        }
        final Bank.AccountIteratorOperations _self = (Bank.AccountIteratorOperations)_so.servant;
        try {
          return _self.pre();
        }
        finally {
          _servant_postinvoke(_so);
        }
      }
    }
  }

  /**
   * <pre>
   *   long getTotalPage ();
   * </pre>
   */
  public int getTotalPage () {

    while (true) {
      if (!_is_local()) {
        org.omg.CORBA.portable.OutputStream _output = null;
        org.omg.CORBA.portable.InputStream  _input  = null;
        int _result;
        try {
          _output = this._request("getTotalPage", true);
          _input = this._invoke(_output);
          _result = _input.read_long();
          return _result;
        }
        catch (org.omg.CORBA.portable.ApplicationException _exception) {
          final org.omg.CORBA.portable.InputStream in = _exception.getInputStream();
          java.lang.String _exception_id = _exception.getId();
          throw new org.omg.CORBA.UNKNOWN("Unexpected User Exception: " + _exception_id);
        }
        catch (org.omg.CORBA.portable.RemarshalException _exception) {
          continue;
        }
        finally {
          this._releaseReply(_input);
        }
      } else {
        final org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke("getTotalPage", _opsClass);
        if (_so == null) {
          continue;
        }
        final Bank.AccountIteratorOperations _self = (Bank.AccountIteratorOperations)_so.servant;
        try {
          return _self.getTotalPage();
        }
        finally {
          _servant_postinvoke(_so);
        }
      }
    }
  }

  /**
   * <pre>
   *   long getNowPage ();
   * </pre>
   */
  public int getNowPage () {

    while (true) {
      if (!_is_local()) {
        org.omg.CORBA.portable.OutputStream _output = null;
        org.omg.CORBA.portable.InputStream  _input  = null;
        int _result;
        try {
          _output = this._request("getNowPage", true);
          _input = this._invoke(_output);
          _result = _input.read_long();
          return _result;
        }
        catch (org.omg.CORBA.portable.ApplicationException _exception) {
          final org.omg.CORBA.portable.InputStream in = _exception.getInputStream();
          java.lang.String _exception_id = _exception.getId();
          throw new org.omg.CORBA.UNKNOWN("Unexpected User Exception: " + _exception_id);
        }
        catch (org.omg.CORBA.portable.RemarshalException _exception) {
          continue;
        }
        finally {
          this._releaseReply(_input);
        }
      } else {
        final org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke("getNowPage", _opsClass);
        if (_so == null) {
          continue;
        }
        final Bank.AccountIteratorOperations _self = (Bank.AccountIteratorOperations)_so.servant;
        try {
          return _self.getNowPage();
        }
        finally {
          _servant_postinvoke(_so);
        }
      }
    }
  }

  /**
   * <pre>
   *   void clean ();
   * </pre>
   */
  public void clean () {

    while (true) {
      if (!_is_local()) {
        org.omg.CORBA.portable.OutputStream _output = null;
        org.omg.CORBA.portable.InputStream  _input  = null;
        try {
          _output = this._request("clean", true);
          _input = this._invoke(_output);
        }
        catch (org.omg.CORBA.portable.ApplicationException _exception) {
          final org.omg.CORBA.portable.InputStream in = _exception.getInputStream();
          java.lang.String _exception_id = _exception.getId();
          throw new org.omg.CORBA.UNKNOWN("Unexpected User Exception: " + _exception_id);
        }
        catch (org.omg.CORBA.portable.RemarshalException _exception) {
          continue;
        }
        finally {
          this._releaseReply(_input);
        }
      } else {
        final org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke("clean", _opsClass);
        if (_so == null) {
          continue;
        }
        final Bank.AccountIteratorOperations _self = (Bank.AccountIteratorOperations)_so.servant;
        try {
          _self.clean();
        }
        finally {
          _servant_postinvoke(_so);
        }
      }
      break;
    }
  }

  /**
   * <pre>
   *   Bank.AccountInfoSeq returnFirstPage ();
   * </pre>
   */
  public Bank.AccountInfo[] returnFirstPage () {

    while (true) {
      if (!_is_local()) {
        org.omg.CORBA.portable.OutputStream _output = null;
        org.omg.CORBA.portable.InputStream  _input  = null;
        Bank.AccountInfo[] _result;
        try {
          _output = this._request("returnFirstPage", true);
          _input = this._invoke(_output);
          _result = Bank.AccountInfoSeqHelper.read(_input);
          return _result;
        }
        catch (org.omg.CORBA.portable.ApplicationException _exception) {
          final org.omg.CORBA.portable.InputStream in = _exception.getInputStream();
          java.lang.String _exception_id = _exception.getId();
          throw new org.omg.CORBA.UNKNOWN("Unexpected User Exception: " + _exception_id);
        }
        catch (org.omg.CORBA.portable.RemarshalException _exception) {
          continue;
        }
        finally {
          this._releaseReply(_input);
        }
      } else {
        final org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke("returnFirstPage", _opsClass);
        if (_so == null) {
          continue;
        }
        final Bank.AccountIteratorOperations _self = (Bank.AccountIteratorOperations)_so.servant;
        try {
          return _self.returnFirstPage();
        }
        finally {
          _servant_postinvoke(_so);
        }
      }
    }
  }

  /**
   * <pre>
   *   Bank.AccountInfoSeq returnLastPage ();
   * </pre>
   */
  public Bank.AccountInfo[] returnLastPage () {

    while (true) {
      if (!_is_local()) {
        org.omg.CORBA.portable.OutputStream _output = null;
        org.omg.CORBA.portable.InputStream  _input  = null;
        Bank.AccountInfo[] _result;
        try {
          _output = this._request("returnLastPage", true);
          _input = this._invoke(_output);
          _result = Bank.AccountInfoSeqHelper.read(_input);
          return _result;
        }
        catch (org.omg.CORBA.portable.ApplicationException _exception) {
          final org.omg.CORBA.portable.InputStream in = _exception.getInputStream();
          java.lang.String _exception_id = _exception.getId();
          throw new org.omg.CORBA.UNKNOWN("Unexpected User Exception: " + _exception_id);
        }
        catch (org.omg.CORBA.portable.RemarshalException _exception) {
          continue;
        }
        finally {
          this._releaseReply(_input);
        }
      } else {
        final org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke("returnLastPage", _opsClass);
        if (_so == null) {
          continue;
        }
        final Bank.AccountIteratorOperations _self = (Bank.AccountIteratorOperations)_so.servant;
        try {
          return _self.returnLastPage();
        }
        finally {
          _servant_postinvoke(_so);
        }
      }
    }
  }

  /**
   * <pre>
   *   void setNowPage (in long nowPage);
   * </pre>
   */
  public void setNowPage (int nowPage) {

    while (true) {
      if (!_is_local()) {
        org.omg.CORBA.portable.OutputStream _output = null;
        org.omg.CORBA.portable.InputStream  _input  = null;
        try {
          _output = this._request("setNowPage", true);
          _output.write_long((int)nowPage);
          _input = this._invoke(_output);
        }
        catch (org.omg.CORBA.portable.ApplicationException _exception) {
          final org.omg.CORBA.portable.InputStream in = _exception.getInputStream();
          java.lang.String _exception_id = _exception.getId();
          throw new org.omg.CORBA.UNKNOWN("Unexpected User Exception: " + _exception_id);
        }
        catch (org.omg.CORBA.portable.RemarshalException _exception) {
          continue;
        }
        finally {
          this._releaseReply(_input);
        }
      } else {
        final org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke("setNowPage", _opsClass);
        if (_so == null) {
          continue;
        }
        final Bank.AccountIteratorOperations _self = (Bank.AccountIteratorOperations)_so.servant;
        try {
          _self.setNowPage(nowPage);
        }
        finally {
          _servant_postinvoke(_so);
        }
      }
      break;
    }
  }

}

⌨️ 快捷键说明

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