Package org.omg.CORBA.portable

Examples of org.omg.CORBA.portable.OutputStream


        try
          {
            org.omg.CORBA_2_3.portable.InputStream in = null;
            try
              {
                OutputStream out = _request("_get_ego", true);
                in = (org.omg.CORBA_2_3.portable.InputStream) _invoke(out);
                return (String) in.read_value(String.class);
              }
            catch (ApplicationException ex)
              {
View Full Code Here


    _methods.put("aMethod", new java.lang.Integer(0));
  }

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

  public void aMethod()
  {
    InputStream in = null;
    try
      {
        OutputStream out = _request("aMethod", true);
        in = _invoke(out);
        return;
      }
    catch (ApplicationException ex)
      {
View Full Code Here

              if (method.equals("multiply"))
                {
                  byte arg0 = in.read_octet();
                  long arg1 = in.read_longlong();
                  long result = target.multiply(arg0, arg1);
                  OutputStream out = reply.createReply();
                  out.write_longlong(result);
                  return out;
                }
              else if (method.equals("_get_ego"))
                {
                  String result = target.getEgo();
                  org.omg.CORBA_2_3.portable.OutputStream out = (org.omg.CORBA_2_3.portable.OutputStream) reply.createReply();
                  out.write_value(result, String.class);
                  return out;
                }
              else if (method.equals("sayHello"))
                {
                  RMI_test arg0 = (RMI_test) PortableRemoteObject.narrow(
                    in.read_Object(), RMI_test.class);
                  String result = target.sayHello(arg0);
                  org.omg.CORBA_2_3.portable.OutputStream out = (org.omg.CORBA_2_3.portable.OutputStream) reply.createReply();
                  out.write_value(result, String.class);
                  return out;
                }
            case 9:
              if (method.equals("passArray"))
                {
                  int[] arg0 = (int[]) in.read_value(int[].class);
                  int result = target.passArray(arg0);
                  OutputStream out = reply.createReply();
                  out.write_long(result);
                  return out;
                }
            case 11:
              if (method.equals("joinStrings"))
                {
                  String arg0 = (String) in.read_value(String.class);
                  String arg1 = (String) in.read_value(String.class);
                  String result = target.joinStrings(arg0, arg1);
                  org.omg.CORBA_2_3.portable.OutputStream out = (org.omg.CORBA_2_3.portable.OutputStream) reply.createReply();
                  out.write_value(result, String.class);
                  return out;
                }
            case 13:
              if (method.equals("passStructure"))
                {
                  myStructure arg0 = (myStructure) in.read_value(myStructure.class);
                  String result = target.passStructure(arg0);
                  org.omg.CORBA_2_3.portable.OutputStream out = (org.omg.CORBA_2_3.portable.OutputStream) reply.createReply();
                  out.write_value(result, String.class);
                  return out;
                }
            case 14:
              if (method.equals("passPrimitives"))
                {
                  byte arg0 = in.read_octet();
                  double arg1 = in.read_double();
                  int arg2 = in.read_long();
                  String arg3 = (String) in.read_value(String.class);
                  float arg4 = in.read_float();
                  char arg5 = in.read_wchar();
                  short arg6 = in.read_short();
                  String result = target.passPrimitives(arg0, arg1, arg2, arg3,
                    arg4, arg5, arg6);
                  org.omg.CORBA_2_3.portable.OutputStream out = (org.omg.CORBA_2_3.portable.OutputStream) reply.createReply();
                  out.write_value(result, String.class);
                  return out;
                }
              else if (method.equals("passCollection"))
                {
                  Collection arg0 = (Collection) in.read_value(Collection.class);
                  String result = target.passCollection(arg0);
                  org.omg.CORBA_2_3.portable.OutputStream out = (org.omg.CORBA_2_3.portable.OutputStream) reply.createReply();
                  out.write_value(result, String.class);
                  return out;
                }
            case 15:
              if (method.equals("passStringArray"))
                {
                  String[] arg0 = (String[]) in.read_value(String[].class);
                  String result = target.passStringArray(arg0);
                  org.omg.CORBA_2_3.portable.OutputStream out = (org.omg.CORBA_2_3.portable.OutputStream) reply.createReply();
                  out.write_value(result, String.class);
                  return out;
                }
              else if (method.equals("passCorbaObject"))
                {
                  org.omg.CORBA.Object arg0 = (org.omg.CORBA.Object) in.read_Object();
                  String result = target.passCorbaObject(arg0);
                  org.omg.CORBA_2_3.portable.OutputStream out = (org.omg.CORBA_2_3.portable.OutputStream) reply.createReply();
                  out.write_value(result, String.class);
                  return out;
                }
            case 16:
              if (method.equals("passReturnRemote"))
                {
                  RMI_test arg0 = (RMI_test) PortableRemoteObject.narrow(
                    in.read_Object(), RMI_test.class);
                  RMI_test result = target.passReturnRemote(arg0);
                  OutputStream out = reply.createReply();
                  Util.writeRemoteObject(out, result);
                  return out;
                }
            case 18:
              if (method.equals("passStructureArray"))
                {
                  myStructure[] arg0 = (myStructure[]) in.read_value(myStructure[].class);
                  String result = target.passStructureArray(arg0);
                  org.omg.CORBA_2_3.portable.OutputStream out = (org.omg.CORBA_2_3.portable.OutputStream) reply.createReply();
                  out.write_value(result, String.class);
                  return out;
                }
              else if (method.equals("passCorbaValueType"))
                {
                  Info arg0 = (Info) in.read_value(Info.class);
                  String result = target.passCorbaValueType(arg0);
                  org.omg.CORBA_2_3.portable.OutputStream out = (org.omg.CORBA_2_3.portable.OutputStream) reply.createReply();
                  out.write_value(result, String.class);
                  return out;
                }
              else if (method.equals("exchangeNodeObject"))
                {
                  NodeObject arg0 = (NodeObject) in.read_value(NodeObject.class);
                  NodeObject result = target.exchangeNodeObject(arg0);
                  org.omg.CORBA_2_3.portable.OutputStream out = (org.omg.CORBA_2_3.portable.OutputStream) reply.createReply();
                  out.write_value(result, NodeObject.class);
                  return out;
                }
              else if (method.equals("passArrayOfRemotes"))
                {
                  RMI_test[] arg0 = (RMI_test[]) in.read_value(RMI_test[].class);
                  String result = target.passArrayOfRemotes(arg0);
                  org.omg.CORBA_2_3.portable.OutputStream out = (org.omg.CORBA_2_3.portable.OutputStream) reply.createReply();
                  out.write_value(result, String.class);
                  return out;
                }
            case 20:
              if (method.equals("passCorbaCMValueType"))
                {
                  cmInfo arg0 = (cmInfo) in.read_value(cmInfo.class);
                  String result = target.passCorbaCMValueType(arg0);
                  org.omg.CORBA_2_3.portable.OutputStream out = (org.omg.CORBA_2_3.portable.OutputStream) reply.createReply();
                  out.write_value(result, String.class);
                  return out;
                }
            case 23:
              if (method.equals("passCorbaValueTypeArray"))
                {
                  Info[] arg0 = (Info[]) in.read_value(Info[].class);
                  String result = target.passCorbaValueTypeArray(arg0);
                  org.omg.CORBA_2_3.portable.OutputStream out = (org.omg.CORBA_2_3.portable.OutputStream) reply.createReply();
                  out.write_value(result, String.class);
                  return out;
                }
          }
        throw new BAD_OPERATION();
      }
View Full Code Here

  /**
   * Insert the node into the universal CORBA wrapper, Any.
   */
  public static void insert(Any a, node that)
  {
    OutputStream out = a.create_output_stream();
    a.type(type());
    write(out, that);
    a.read_value(out.create_input_stream(), type());
  }
View Full Code Here

  private static String the_id =
    "IDL:gnu/testlet/org/omg/PortableServer/POAOperations/communication/ourUserException:1.0";

  public static void insert(Any a, ourUserException that)
  {
    OutputStream out = a.create_output_stream();
    a.type(type());
    write(out, that);
    a.read_value(out.create_input_stream(), type());
  }
View Full Code Here

    InfoHolder w2 = new InfoHolder();
    w2.value = InfoHelper.read(in);

    this.hello(w1, w2);

    OutputStream out = rh.createReply();

    cmInfoHelper.write(out, w1.value);
    InfoHelper.write(out, w2.value);

    return out;
View Full Code Here

  public void hello(cmInfoHolder w1, InfoHolder w2)
  {
    InputStream _in = null;
    try
      {
        OutputStream _out = _request("hello", true);
        cmInfoHelper.write(_out, w1.value);
        InfoHelper.write(_out, w2.value);
        _in = _invoke(_out);
        w1.value = cmInfoHelper.read(_in);
        w2.value = InfoHelper.read(_in);
View Full Code Here

  private static String _id =
    "IDL:gnu/testlet/org/omg/CORBA_2_3/ORB/Valtype/Info:1.0";

  public static void insert(org.omg.CORBA.Any a, Info that)
  {
    OutputStream out = a.create_output_stream();
    a.type(type());
    write(out, that);
    a.read_value(out.create_input_stream(), type());
  }
View Full Code Here

  private static String _id =
    "IDL:gnu/testlet/org/omg/CORBA_2_3/ORB/Valtype/cmInfo:1.0";

  public static void insert(Any a, cmInfo that)
  {
    OutputStream out = a.create_output_stream();
    a.type(type());
    write(out, that);
    a.read_value(out.create_input_stream(), type());
  }
View Full Code Here

TOP

Related Classes of org.omg.CORBA.portable.OutputStream

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.