Package org.apache.yoko.orb.CORBA

Examples of org.apache.yoko.orb.CORBA.InputStream


        org.omg.CORBA.AnySeqHelper.insert(aSeq, values);

        org.apache.yoko.orb.CORBA.Any valSeq;
        valSeq = (org.apache.yoko.orb.CORBA.Any) aSeq;

        InputStream in = (InputStream) valSeq.create_input_stream();

        // NOTE: the input stream I obtain does not contain
        // indirections that "span" the original members of the sequence.
        // (that is an issue with the implementation of Anys). Thus
        // ValueType that span the original Any instance are not
        // properly mapped.

        //
        // Create a sequence of Dynamic Anys
        //
        org.omg.DynamicAny.DynAny result[] = new org.omg.DynamicAny.DynAny[values.length];

        DynValueReader dynValueReader = new DynValueReader(orbInstance_, this,
                allow_truncate);

        for (int i = 0; i < values.length; i++) {
            org.omg.CORBA.TypeCode type = ((org.apache.yoko.orb.CORBA.Any) values[i])
                    ._OB_type();

            result[i] = prepare_dyn_any_from_type_code(type, dynValueReader);
        }

        //
        // Populate the DynAnys by unmarshalling the sequence of Anys.
        // Start by skipping the sequence lenght
        //
        in.read_ulong();

        for (int i = 0; i < values.length; i++) {
            in.read_TypeCode();
            DynAny_impl impl = (DynAny_impl) result[i];
            impl._OB_unmarshal(in);
        }

        return result;
View Full Code Here


       
        if (codebase == null || getorb(codebase) != orb.getORB()) {
           
            byte[] coct = ctx.context_data;
            Buffer buf = new Buffer(coct, coct.length);
            InputStream in = new InputStream(buf);
            in._OB_ORBInstance(orb);
            in._OB_readEndian();
            org.omg.CORBA.Object obj = in.read_Object();
            try {
                codebase = org.omg.SendingContext.CodeBaseHelper.narrow(obj);
            } catch (BAD_PARAM ex) {
                codebase = null;
            }
View Full Code Here

       
        if (codebase == null || getorb(codebase) != orb.getORB()) {
           
            byte[] coct = ctx.context_data;
            Buffer buf = new Buffer(coct, coct.length);
            InputStream in = new InputStream(buf);
            in._OB_ORBInstance(orb);
            in._OB_readEndian();
            org.omg.CORBA.Object obj = in.read_Object();
            try {
                codebase = org.omg.SendingContext.CodeBaseHelper.narrow(obj);
            } catch (BAD_PARAM ex) {
                codebase = null;
            }
View Full Code Here

        DynAny_impl impl = (DynAny_impl) comp;
        org.apache.yoko.orb.OCI.Buffer buf = new org.apache.yoko.orb.OCI.Buffer();
        OutputStream out = new OutputStream(buf);
        out._OB_ORBInstance(orbInstance_);
        impl._OB_marshal(out);
        InputStream in = (InputStream) out.create_input_stream();
        // This is not necessary
        // in._OB_ORBInstance(orbInstance_);

        return in.read_value();
    }
View Full Code Here

        org.omg.CORBA.AnySeqHelper.insert(aSeq, values);

        org.apache.yoko.orb.CORBA.Any valSeq;
        valSeq = (org.apache.yoko.orb.CORBA.Any) aSeq;

        InputStream in = (InputStream) valSeq.create_input_stream();

        // NOTE: the input stream I obtain does not contain
        // indirections that "span" the original members of the sequence.
        // (that is an issue with the implementation of Anys). Thus
        // ValueType that span the original Any instance are not
        // properly mapped.

        //
        // Create a sequence of Dynamic Anys
        //
        org.omg.DynamicAny.DynAny result[] = new org.omg.DynamicAny.DynAny[values.length];

        DynValueReader dynValueReader = new DynValueReader(orbInstance_, this,
                allow_truncate);

        for (int i = 0; i < values.length; i++) {
            org.omg.CORBA.TypeCode type = ((org.apache.yoko.orb.CORBA.Any) values[i])
                    ._OB_type();

            result[i] = prepare_dyn_any_from_type_code(type, dynValueReader);
        }

        //
        // Populate the DynAnys by unmarshalling the sequence of Anys.
        // Start by skipping the sequence lenght
        //
        in.read_ulong();

        for (int i = 0; i < values.length; i++) {
            in.read_TypeCode();
            DynAny_impl impl = (DynAny_impl) result[i];
            impl._OB_unmarshal(in);
        }

        return result;
View Full Code Here

        if (dynValueWriter != null)
            _OB_marshal(out, dynValueWriter);
        else
            _OB_marshal(out);

        InputStream in = (InputStream) out.create_input_stream();
        Any result = new Any(orbInstance_, type_, in);
        return result;
    }
View Full Code Here

        org.omg.DynamicAny.DynAny result = prepare(type_, dynValueReader_,
                false);
        DynAny_impl impl = (DynAny_impl) result;

        InputStream in = (InputStream) out.create_input_stream();
        impl._OB_unmarshal(in);

        return result;
    }
View Full Code Here

        else {
            org.apache.yoko.orb.OCI.Buffer buf = new org.apache.yoko.orb.OCI.Buffer();
            OutputStream out = new OutputStream(buf);
            out._OB_ORBInstance(orbInstance_);
            _OB_marshal(out);
            InputStream in = (InputStream) out.create_input_stream();
            return new Any(orbInstance_, type_, in);
        }
    }
View Full Code Here

        if (dynValueWriter != null)
            _OB_marshal(out, dynValueWriter);
        else
            _OB_marshal(out);

        InputStream in = (InputStream) out.create_input_stream();
        Any result = new Any(orbInstance_, type_, in);
        return result;
    }
View Full Code Here

            if (dynValueWriter != null)
                _OB_marshal(out, dynValueWriter);
            else
                _OB_marshal(out);

            InputStream in = (InputStream) out.create_input_stream();
            return new Any(orbInstance_, type_, in);
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.yoko.orb.CORBA.InputStream

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.