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

📄 _hrmanagerstub.java

📁 Java分布式应用程序设计 一书的源代码
💻 JAVA
字号:
package humanresource.HR;

/**
 * <ul>
 * <li> <b>IDL Source</b>    "E:/HumanResource/src/humanresource/HR.idl"
 * <li> <b>IDL Name</b>      ::HR::HRManager
 * <li> <b>Repository Id</b> IDL:HR/HRManager:1.0
 * </ul>
 * <b>IDL definition:</b>
 * <pre>
 * interface HRManager {
  ...
};
 * </pre>
 */
public class _HRManagerStub extends com.inprise.vbroker.CORBA.portable.ObjectImpl implements humanresource.HR.HRManager {
  final public static java.lang.Class _opsClass = humanresource.HR.HRManagerOperations.class;

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

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

  /**
   * <pre>
   *   boolean register (in humanresource.HR.PersonalInfoStruct InfoStruct);
   * </pre>
   */
  public boolean register (humanresource.HR.PersonalDesc InfoStruct) {

    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("register", true);
          humanresource.HR.PersonalDescHelper.write(_output, InfoStruct);
          _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("register", _opsClass);
        if (_so == null) {
          continue;
        }
        final humanresource.HR.HRManagerOperations _self = (humanresource.HR.HRManagerOperations)_so.servant;
        try {
          return _self.register(InfoStruct);
        }
        finally {
          _servant_postinvoke(_so);
        }
      }
    }
  }

  /**
   * <pre>
   *   boolean unRegister (in string name);
   * </pre>
   */
  public boolean unRegister (java.lang.String name) {

    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("unRegister", true);
          _output.write_string((java.lang.String)name);
          _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("unRegister", _opsClass);
        if (_so == null) {
          continue;
        }
        final humanresource.HR.HRManagerOperations _self = (humanresource.HR.HRManagerOperations)_so.servant;
        try {
          return _self.unRegister(name);
        }
        finally {
          _servant_postinvoke(_so);
        }
      }
    }
  }

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

    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("getClertCount", 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("getClertCount", _opsClass);
        if (_so == null) {
          continue;
        }
        final humanresource.HR.HRManagerOperations _self = (humanresource.HR.HRManagerOperations)_so.servant;
        try {
          return _self.getClertCount();
        }
        finally {
          _servant_postinvoke(_so);
        }
      }
    }
  }

  /**
   * <pre>
   *   humanresource.HR.PersonalInfoStruct getDescription (in string name);
   * </pre>
   */
  public humanresource.HR.PersonalDesc getDescription (java.lang.String name) {

    while (true) {
      if (!_is_local()) {
        org.omg.CORBA.portable.OutputStream _output = null;
        org.omg.CORBA.portable.InputStream  _input  = null;
        humanresource.HR.PersonalDesc _result;
        try {
          _output = this._request("getDescription", true);
          _output.write_string((java.lang.String)name);
          _input = this._invoke(_output);
          _result = humanresource.HR.PersonalDescHelper.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("getDescription", _opsClass);
        if (_so == null) {
          continue;
        }
        final humanresource.HR.HRManagerOperations _self = (humanresource.HR.HRManagerOperations)_so.servant;
        try {
          return _self.getDescription(name);
        }
        finally {
          _servant_postinvoke(_so);
        }
      }
    }
  }

}

⌨️ 快捷键说明

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