Package org.apache.yoko.orb.CORBA

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


    protected org.omg.CORBA.Any[] getElements() {
        org.omg.CORBA.Any[] result = new org.omg.CORBA.Any[length_];
        for (int i = 0; i < length_; i++) {
            if (primitive_) {
                result[i] = new Any(orbInstance_);
                getValue(i, result[i]);
            } else {
                result[i] = components_[i].to_any();
            }
        }
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();

        if (val.value() == null)
            throw new org.omg.DynamicAny.DynAnyPackage.InvalidValue();

        org.omg.CORBA.portable.InputStream in = val.create_input_stream();
        _OB_unmarshal((InputStream) in);

        index_ = 0;

        notifyParent();
View Full Code Here

            _OB_marshal(out, dynValueWriter);
        else
            _OB_marshal(out);

        org.omg.CORBA.portable.InputStream in = out.create_input_stream();
        Any result = new Any(orbInstance_, type_, in);
        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();

        try {
            java.math.BigDecimal f = val.extract_fixed();

            if (f == null || f.scale() > origType_.fixed_scale())
                throw new org.omg.DynamicAny.DynAnyPackage.InvalidValue();
            value_ = f;
        } catch (org.omg.CORBA.TypeCodePackage.BadKind ex) {
View Full Code Here

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

        return new Any(orbInstance_, type_, value_);
    }
View Full Code Here

            throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch,
            org.omg.DynamicAny.DynAnyPackage.InvalidValue {
        if (destroyed_)
            throw new org.omg.CORBA.OBJECT_NOT_EXIST();

        Any val = null;
        try {
            val = (Any) value;
        } catch (ClassCastException ex) {
            val = new Any(value);
        }

        if (val.value() == null)
            throw new org.omg.DynamicAny.DynAnyPackage.InvalidValue();

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

        value_ = ((Integer) val.value()).intValue();

        notifyParent();
    }
View Full Code Here

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

        return new Any(orbInstance_, type_, new Integer(value_));
    }
View Full Code Here

    }

    public synchronized void insert_ulong_seq(int[] value)
            throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch,
            org.omg.DynamicAny.DynAnyPackage.InvalidValue {
        Any any = _OB_currentAny();

        checkValue(any, org.omg.CORBA.ULongSeqHelper.type().kind());

        any.replace(any.type(), value);

        notifyParent();
    }
View Full Code Here

    }

    public synchronized void insert_longlong_seq(long[] value)
            throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch,
            org.omg.DynamicAny.DynAnyPackage.InvalidValue {
        Any any = _OB_currentAny();

        checkValue(any, org.omg.CORBA.LongLongSeqHelper.type().kind());

        any.replace(any.type(), value);

        notifyParent();
    }
View Full Code Here

    }

    public synchronized void insert_ulonglong_seq(long[] value)
            throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch,
            org.omg.DynamicAny.DynAnyPackage.InvalidValue {
        Any any = _OB_currentAny();

        checkValue(any, org.omg.CORBA.ULongLongSeqHelper.type().kind());

        any.replace(any.type(), value);

        notifyParent();
    }
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.