Package org.omg.CORBA.portable

Examples of org.omg.CORBA.portable.OutputStream


                throw new org.omg.CORBA.BAD_PARAM(0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE);
            }
            try {
                // invocation and sending result
                Object result = invocationProxy.invoke(operationName, inputInstances);
                OutputStream out = rh.createReply();
                if (types.getOutputType() != null) {
                    TypeTree tree = types.getOutputType();
                    TypeHelpersProxy.write(tree.getRootNode(), out, result);
                }
                return out;
            } catch (InvocationException ie) {
                // handling user exception
                try {
                    OutputStream out = rh.createExceptionReply();
                    Class<?> exceptionClass = ie.getTargetException().getClass();
                    TypeTree tree = TypeTreeCreator.createTypeTree(exceptionClass, null);
                    String exceptionId = Utils.getTypeId(exceptionClass);
                    out.write_string(exceptionId);
                    TypeHelpersProxy.write(tree.getRootNode(), out, ie.getTargetException());
                    return out;
                } catch (Exception e) {
                    logger.log(Level.WARNING, "Exception during handling invocation exception", e);
                }
View Full Code Here


     * @return
     */
    public DynaCorbaResponse invoke() throws Exception {
        DynaCorbaResponse response = new DynaCorbaResponse();
        String finalOperationName = getFinalOperationName();
        OutputStream outputStream = ((ObjectImpl)remoteObject)._request(finalOperationName, true);
        passArguments(outputStream);
        try {
            inputStream = remoteObject._invoke(outputStream);
            if (inputStream != null && returnTree != null) {
                response.setContent(TypeHelpersProxy.read(returnTree.getRootNode(), inputStream));
View Full Code Here

    _methods.put("deactivate", new java.lang.Integer(2));
  }

  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 setForwardRequest(org.omg.CORBA.Object obj)
  {
    InputStream in = null;
    try
      {
        OutputStream out = _request("setForwardRequest", true);
        ObjectHelper.write(out, obj);
        in = _invoke(out);
        return;
      }
    catch (ApplicationException $ex)
View Full Code Here

  public org.omg.CORBA.Object get_servant()
  {
    InputStream in = null;
    try
      {
        OutputStream out = _request("get_servant", true);
        in = _invoke(out);

        return ObjectHelper.read(in);
      }
    catch (ApplicationException $ex)
View Full Code Here

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

  //
  //debug.log ("create_input_stream");
  if (AnyImpl.isStreamed[realType().kind().value()]) {
      return stream.dup();
  } else {
      OutputStream os = (OutputStream)orb.create_output_stream();
      TCUtility.marshalIn(os, realType(), value, object);

      return os.create_input_stream();
  }
    }
View Full Code Here

    // Extracts a member value according to the given TypeCode from the given complex Any
    // (at the Anys current internal stream position, consuming the anys stream on the way)
    // and returns it wrapped into a new Any
    public Any extractAny(TypeCode memberType, ORB orb) {
        Any returnValue = orb.create_any();
        OutputStream out = returnValue.create_output_stream();
        TypeCodeImpl.convertToNative(orb, memberType).copy((InputStream)stream, out);
        returnValue.read_value(out.create_input_stream(), memberType);
        return returnValue;
    }
View Full Code Here

    // This method could very well be moved into TypeCodeImpl or a common utility class,
    // but is has to be in this package.
    static public Any extractAnyFromStream(TypeCode memberType, InputStream input, ORB orb) {
        Any returnValue = orb.create_any();
        OutputStream out = returnValue.create_output_stream();
        TypeCodeImpl.convertToNative(orb, memberType).copy(input, out);
        returnValue.read_value(out.create_input_stream(), memberType);
        return returnValue;
    }
View Full Code Here

                throw new org.omg.CORBA.BAD_PARAM(0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE);
            }
            try {
                // invocation and sending result
                Object result = invocationProxy.invoke(operationName, inputInstances);
                OutputStream out = rh.createReply();
                if (types.getOutputType() != null) {
                    TypeTree tree = types.getOutputType();
                    TypeHelpersProxy.write(tree.getRootNode(), out, result);
                }
                return out;
            } catch (InvocationException ie) {
                // handling user exception
                try {
                    OutputStream out = rh.createExceptionReply();
                    Class<?> exceptionClass = ie.getTargetException().getClass();
                    TypeTree tree = TypeTreeCreator.createTypeTree(exceptionClass, null);
                    String exceptionId = Utils.getTypeId(exceptionClass);
                    out.write_string(exceptionId);
                    TypeHelpersProxy.write(tree.getRootNode(), out, ie.getTargetException());
                    return out;
                } catch (Exception e) {
                    logger.log(Level.WARNING, "Exception during handling invocation exception", e);
                }
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.