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

📄 _bookiteratorstub.java

📁 分布式CORBA的一些简答例程
💻 JAVA
字号:
package BookStore;

/**
 * <ul>
 * <li> <b>IDL Source</b>    "BookStore.idl"
 * <li> <b>IDL Name</b>      ::BookStore::BookIterator
 * <li> <b>Repository Id</b> IDL:BookStore/BookIterator:1.0
 * </ul>
 * <b>IDL definition:</b>
 * <pre>
 * interface BookIterator {
  ...
};
 * </pre>
 */
public class _BookIteratorStub extends com.inprise.vbroker.CORBA.portable.ObjectImpl implements BookStore.BookIterator {
  final public static java.lang.Class _opsClass = BookStore.BookIteratorOperations.class;

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

  private static java.lang.String[] __ids = {
    "IDL:BookStore/BookIterator: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 BookStore.BookIteratorOperations _self = (BookStore.BookIteratorOperations)_so.servant;
        try {
          return _self.hasNext();
        }
        finally {
          _servant_postinvoke(_so);
        }
      }
    }
  }

  /**
   * <pre>
   *   BookStore.BookInfoSeq next ();
   * </pre>
   */
  public BookStore.BookInfo[] next () {

    while (true) {
      if (!_is_local()) {
        org.omg.CORBA.portable.OutputStream _output = null;
        org.omg.CORBA.portable.InputStream  _input  = null;
        BookStore.BookInfo[] _result;
        try {
          _output = this._request("next", true);
          _input = this._invoke(_output);
          _result = BookStore.BookInfoSeqHelper.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 BookStore.BookIteratorOperations _self = (BookStore.BookIteratorOperations)_so.servant;
        try {
          return _self.next();
        }
        finally {
          _servant_postinvoke(_so);
        }
      }
    }
  }

}

⌨️ 快捷键说明

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