Package org.apache.yoko.orb.CORBA

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


        //
        // Convert value to an ORBacus Any - the JDK implementation
        // of TypeCode.equivalent() raises NO_IMPLEMENT
        //
        Any val = null;
        try {
            val = (Any) value;
        } catch (ClassCastException ex) {
            try {
                val = new Any(value);
            } catch (NullPointerException e) {
                throw new org.omg.DynamicAny.DynAnyPackage.InvalidValue();
            }
        }

        if (!val._OB_type().equivalent(type_))
            throw new org.omg.DynamicAny.DynAnyPackage.TypeMismatch();

        org.omg.CORBA.portable.InputStream in = null;
        try {
            in = val.create_input_stream();
        } catch (NullPointerException e) {
            throw new org.omg.DynamicAny.DynAnyPackage.InvalidValue();
        }

        _OB_unmarshal((InputStream) in);
View Full Code Here


            _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.apache.yoko.orb.OB.Assert._OB_assert(member_ != null);
            p = (DynAny_impl) member_;
        }

        Any result = null;

        if (p != null)
            result = p._OB_currentAnyValue();

        return result;
View Full Code Here

        //
        // Convert value to an ORBacus Any - the JDK implementation
        // of TypeCode.equivalent() raises NO_IMPLEMENT
        //
        Any val = null;
        try {
            val = (Any) value;
        } catch (ClassCastException ex) {
            try {
                val = new Any(value);
            } catch (NullPointerException e) {
                throw new org.omg.DynamicAny.DynAnyPackage.InvalidValue();
            }
        }

        if (!val._OB_type().equivalent(type_))
            throw new org.omg.DynamicAny.DynAnyPackage.TypeMismatch();

        org.omg.CORBA.portable.InputStream in = null;
        try {
            in = val.create_input_stream();
        } catch (NullPointerException e) {
            throw new org.omg.DynamicAny.DynAnyPackage.InvalidValue();
        }

        _OB_unmarshal((InputStream) in);
View Full Code Here

    public synchronized org.omg.CORBA.Any to_any(DynValueWriter dynValueWriter) {
        if (destroyed_)
            throw new org.omg.CORBA.OBJECT_NOT_EXIST();

        if (is_null())
            return new Any(orbInstance_, type_, null);
        else {
            org.apache.yoko.orb.OCI.Buffer buf = new org.apache.yoko.orb.OCI.Buffer();
            OutputStream out = new OutputStream(buf);
            out._OB_ORBInstance(orbInstance_);

            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

            // get an ORBacus TypeCode
            //
            try {
                values[i] = (Any) value[i].value;
            } catch (ClassCastException ex) {
                values[i] = new Any(value[i].value);
            }
            org.omg.CORBA.TypeCode valueType = values[i]._OB_type();
            if (!valueType.equivalent(types_[i]))
                throw new org.omg.DynamicAny.DynAnyPackage.TypeMismatch();
        }
View Full Code Here

        //
        // Convert value to an ORBacus Any - the JDK implementation
        // of TypeCode.equivalent() raises NO_IMPLEMENT
        //
        Any val = null;
        try {
            val = (Any) value;
        } catch (ClassCastException ex) {
            try {
                val = new Any(value);
            } catch (NullPointerException e) {
                throw new org.omg.DynamicAny.DynAnyPackage.InvalidValue();
            }
        }

        if (!val._OB_type().equivalent(type_))
            throw new org.omg.DynamicAny.DynAnyPackage.TypeMismatch();

        org.omg.CORBA.portable.InputStream in = null;
        try {
            in = val.create_input_stream();
        } catch (NullPointerException e) {
            throw new org.omg.DynamicAny.DynAnyPackage.InvalidValue();
        }

        _OB_unmarshal((InputStream) in);
View Full Code Here

            _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

                // get an ORBacus TypeCode
                //
                try {
                    values[i] = (Any) value[i].value;
                } catch (ClassCastException ex) {
                    values[i] = new Any(value[i].value);
                }
                org.omg.CORBA.TypeCode valueType = values[i]._OB_type();
                org.omg.CORBA.TypeCode memberType = components_[i].type();
                if (!valueType.equivalent(memberType))
                    throw new org.omg.DynamicAny.DynAnyPackage.TypeMismatch();
View Full Code Here

        //
        // Convert value to an ORBacus Any - the JDK implementation
        // of TypeCode.equivalent() raises NO_IMPLEMENT
        //
        Any val = null;
        try {
            val = (Any) value;
        } catch (ClassCastException ex) {
            try {
                val = new Any(value);
            } catch (NullPointerException e) {
                throw new org.omg.DynamicAny.DynAnyPackage.InvalidValue();
            }
        }

        if (!val._OB_type().equivalent(type_))
            throw new org.omg.DynamicAny.DynAnyPackage.TypeMismatch();

        org.omg.CORBA.portable.InputStream in = null;
        try {
            in = val.create_input_stream();
        } catch (NullPointerException e) {
            throw new org.omg.DynamicAny.DynAnyPackage.InvalidValue();
        }

        _OB_unmarshal((InputStream) in);
View Full Code Here

TOP

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

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.