Package org.omg.CORBA.portable

Examples of org.omg.CORBA.portable.OutputStream


    // 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


        while (remarshal) {
            org.omg.CORBA.Object objref = null ;
            remarshal = false;

            OutputStream os = (OutputStream) bootstrapDelegate.request( objref,
                operationName, true);

            if ( parameter != null ) {
                os.write_string( parameter );
            }

            try {
                // The only reason a null objref is passed is to get the version of
                // invoke used by streams.  Otherwise the PortableInterceptor
View Full Code Here

                           + ": Handling invoke handler type servant");
                }

                InvokeHandler invhandle = (InvokeHandler)servant ;

                OutputStream stream =
                    (OutputStream)invhandle._invoke(
                      operation,
                      (org.omg.CORBA.portable.InputStream)req.getInputObject(),
                      req);
                response = (CorbaMessageMediator)
View Full Code Here

                           + ": handling normal result");
                }

                // Marshal out/inout/return parameters into the ReplyMessage
                response = sendingReply(req);
                OutputStream os = (OutputStream) response.getOutputObject();
                sreq.marshalReplyParams(os);
            else {
                if (orb.subcontractDebugFlag) {
                    dprint(".handleDynamicResult: " + opAndId(req)
                           + ": handling error");
View Full Code Here

                           + ": handling user exception");
                }

                resp = req.getProtocolHandler()
                    .createUserExceptionResponse(req, scs);
                OutputStream os = (OutputStream)resp.getOutputObject();
                excany.write_value(os);
            }

            return resp;
        } finally {
View Full Code Here

    /**
     * Static method for writing a CORBA standard exception to an Any.
     * @param any The Any to write the SystemException into.
     */
    public static void insertSystemException(SystemException ex, Any any) {
        OutputStream out = any.create_output_stream();
        ORB orb = (ORB)(out.orb());
        String name = ex.getClass().getName();
        String repID = ORBUtility.repositoryIdOf(name);
        out.write_string(repID);
        out.write_long(ex.minor);
        out.write_long(ex.completed.value());
        any.read_value(out.create_input_stream(),
            getSystemExceptionTypeCode(orb, repID, name));
    }
View Full Code Here

    }

    public StubIORImpl( org.omg.CORBA.Object obj )
    {
        // write the IOR to an OutputStream and get an InputStream
        OutputStream ostr = StubAdapter.getORB( obj ).create_output_stream();
        ostr.write_Object(obj);
        InputStream istr = ostr.create_input_stream();

        // read the IOR components back from the stream
        int typeLength = istr.read_long();
        typeData = new byte[typeLength];
        istr.read_octet_array(typeData, 0, typeLength);
View Full Code Here

        InputStream is = null;
        // instantiate the stub
        org.omg.CORBA.Object stub = null ;

        try {
            OutputStream os = request(null, "_interface", true);
            is = (InputStream) invoke((org.omg.CORBA.Object)null, os);

            org.omg.CORBA.Object objimpl =
                (org.omg.CORBA.Object) is.read_Object();
View Full Code Here

    }

    public Delegate getDelegate( ORB orb )
    {
        // write the IOR components to an org.omg.CORBA.portable.OutputStream
        OutputStream ostr = orb.create_output_stream();
        ostr.write_long(typeData.length);
        ostr.write_octet_array(typeData, 0, typeData.length);
        ostr.write_long(profileTags.length);
        for (int i = 0; i < profileTags.length; i++) {
            ostr.write_long(profileTags[i]);
            ostr.write_long(profileData[i].length);
            ostr.write_octet_array(profileData[i], 0, profileData[i].length);
        }

        InputStream istr = ostr.create_input_stream() ;

        // read the IOR back from the stream
        org.omg.CORBA.Object obj = (org.omg.CORBA.Object)istr.read_Object();
        return StubAdapter.getDelegate( obj ) ;
    }
View Full Code Here

        // But repositoryIds may not be complete, so it may be necessary to
        // go to server.

        InputStream is = null;
        try {
            OutputStream os = request(null, "_is_a", true);
            os.write_string(dest);
            is = (InputStream) invoke((org.omg.CORBA.Object) null, os);

            return is.read_boolean();

        } catch (ApplicationException 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.