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

📄 atmserverpoa.java

📁 java初学者适用的源码一共分成15章每章都有配套源码,简单易用
💻 JAVA
字号:
package atmserver.ATMDemo;

/**
 * <ul>
 * <li> <b>IDL Source</b>    "E:/su/18/ATMServer/src/atmserver/ATMDemo.idl"
 * <li> <b>IDL Name</b>      ::ATMDemo::ATMServer
 * <li> <b>Repository Id</b> IDL:ATMDemo/ATMServer:1.0
 * </ul>
 * <b>IDL definition:</b>
 * <pre>
 * interface ATMServer {
  ...
};
 * </pre>
 */
public abstract class ATMServerPOA extends org.omg.PortableServer.Servant implements 
  org.omg.CORBA.portable.InvokeHandler, atmserver.ATMDemo.ATMServerOperations {

  public atmserver.ATMDemo.ATMServer _this () {
   return atmserver.ATMDemo.ATMServerHelper.narrow(super._this_object());
  }

  public atmserver.ATMDemo.ATMServer _this (org.omg.CORBA.ORB orb) {
    return atmserver.ATMDemo.ATMServerHelper.narrow(super._this_object(orb));
  }

  public java.lang.String[] _all_interfaces (final org.omg.PortableServer.POA poa, final byte[] objectId) {
    return __ids;
  }

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

  private static java.util.Dictionary _methods = new java.util.Hashtable();

  static {
    _methods.put("openAccount", new int[] { 0, 0 });
    _methods.put("getClient", new int[] { 0, 1 });
  }

  public org.omg.CORBA.portable.OutputStream _invoke (java.lang.String opName,
                                                      org.omg.CORBA.portable.InputStream _input,
                                                      org.omg.CORBA.portable.ResponseHandler handler) {
    int[] method = (int[]) _methods.get(opName);
    if (method == null) {
      throw new org.omg.CORBA.BAD_OPERATION();
    }
    switch (method[0]) {
      case 0: {
        return atmserver.ATMDemo.ATMServerPOA._invoke(this, method[1], _input, handler);
      }
    }
    throw new org.omg.CORBA.BAD_OPERATION();
  }

  public static org.omg.CORBA.portable.OutputStream _invoke (atmserver.ATMDemo.ATMServerOperations _self,
                                                             int _method_id,
                                                             org.omg.CORBA.portable.InputStream _input,
                                                             org.omg.CORBA.portable.ResponseHandler _handler) {
    org.omg.CORBA.portable.OutputStream _output = null;
    {
      switch (_method_id) {
      case 0: {
        atmserver.ATMDemo.registerInfo personalInfo;
        personalInfo = atmserver.ATMDemo.registerInfoHelper.read(_input);
        boolean _result = _self.openAccount(personalInfo);
        _output = _handler.createReply();
        _output.write_boolean((boolean)_result);
        return _output;
      }
      case 1: {
        java.lang.String name;
        name = _input.read_string();
        atmserver.ATMDemo.ATMClient _result = _self.getClient(name);
        _output = _handler.createReply();
        atmserver.ATMDemo.ATMClientHelper.write(_output, _result);
        return _output;
      }
      }
      throw new org.omg.CORBA.BAD_OPERATION();
    }
  }
}

⌨️ 快捷键说明

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