addpoa.java

来自「This is source code corba with java」· Java 代码 · 共 75 行

JAVA
75
字号
package ArithApp;


/**
* ArithApp/AddPOA.java .
* Generated by the IDL-to-Java compiler (portable), version "3.2"
* from add/add.idl
* Thursday, June 12, 2008 11:37:43 AM GMT+07:00
*/

public abstract class AddPOA extends org.omg.PortableServer.Servant
 implements ArithApp.AddOperations, org.omg.CORBA.portable.InvokeHandler
{

  // Constructors

  private static java.util.Hashtable _methods = new java.util.Hashtable ();
  static
  {
    _methods.put ("addArrays", new java.lang.Integer (0));
  }

  public org.omg.CORBA.portable.OutputStream _invoke (String $method,
                                org.omg.CORBA.portable.InputStream in,
                                org.omg.CORBA.portable.ResponseHandler $rh)
  {
    org.omg.CORBA.portable.OutputStream out = null;
    java.lang.Integer __method = (java.lang.Integer)_methods.get ($method);
    if (__method == null)
      throw new org.omg.CORBA.BAD_OPERATION (0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE);

    switch (__method.intValue ())
    {
       case 0:  // ArithApp/Add/addArrays
       {
         int a[] = ArithApp.AddPackage.arrayHelper.read (in);
         int b[] = ArithApp.AddPackage.arrayHelper.read (in);
         ArithApp.AddPackage.arrayHolder result = new ArithApp.AddPackage.arrayHolder ();
         this.addArrays (a, b, result);
         out = $rh.createReply();
         ArithApp.AddPackage.arrayHelper.write (out, result.value);
         break;
       }

       default:
         throw new org.omg.CORBA.BAD_OPERATION (0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE);
    }

    return out;
  } // _invoke

  // Type-specific CORBA::Object operations
  private static String[] __ids = {
    "IDL:ArithApp/Add:1.0"};

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

  public Add _this() 
  {
    return AddHelper.narrow(
    super._this_object());
  }

  public Add _this(org.omg.CORBA.ORB orb) 
  {
    return AddHelper.narrow(
    super._this_object(orb));
  }


} // class AddPOA

⌨️ 快捷键说明

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