Package org.omg.CORBA

Examples of org.omg.CORBA.Any.insert_short()


        {
            try {
                Policy[] pl = new Policy[1];
                Any any = orb.create_any();
                any.insert_short(org.apache.yoko.orb.OB.RETRY_ALWAYS.value);
                pl[0] = orb.create_policy(
                        org.apache.yoko.orb.OB.RETRY_POLICY_ID.value, any);
                pm.set_policy_overrides(pl, SetOverrideType.ADD_OVERRIDE);

            } catch (PolicyError ex) {
View Full Code Here


        {
            try {
                Policy[] pl = new Policy[2];
                Any any = orb.create_any();
                any.insert_short(org.apache.yoko.orb.OB.RETRY_STRICT.value);
                pl[0] = orb.create_policy(
                        org.apache.yoko.orb.OB.RETRY_POLICY_ID.value, any);
                any = orb.create_any();
                any.insert_ulong(3000);
                pl[1] = orb.create_policy(
View Full Code Here

        }

        {
            try {
                Any any = orb.create_any();
                any.insert_short(org.apache.yoko.orb.OB.RETRY_ALWAYS.value);
                Policy[] pl = new Policy[2];
                pl[0] = orb.create_policy(
                        org.apache.yoko.orb.OB.RETRY_POLICY_ID.value, any);
                pl[1] = orb.create_policy(
                        org.apache.yoko.orb.OB.RETRY_POLICY_ID.value, any);
View Full Code Here

            //
            // Create an any having a TypeCode that will not match tc
            //
            if (tc.kind() != TCKind.tk_short)
                badAny.insert_short((short) 0);
            else
                badAny.insert_ushort((short) 0);

            //
            // Test: type()
View Full Code Here

            // Test: set_elements()
            //
            anySeq = new Any[3]; // decrease sequence length
            for (i = 0; i < 3; i++) {
                Any anyVal = orb.create_any();
                anyVal.insert_short((short) (i + 10));
                anySeq[i] = orb.create_any();
                anySeq[i].insert_any(anyVal);
            }
            s1.set_elements(anySeq);
            s1.rewind();
View Full Code Here

            // Test: set_elements_as_dyn_any
            //
            dynAnySeq = new DynAny[4]; // increase sequence length
            for (i = 0; i < 4; i++) {
                Any anyVal = orb.create_any();
                anyVal.insert_short((short) (i + 100));
                any.insert_any(anyVal);
                dynAnySeq[i] = factory.create_dyn_any(any);
            }
            s1.set_elements_as_dyn_any(dynAnySeq);
            s1.rewind();
View Full Code Here

    public void establish_components(IORInfo info) {
        try {
            // Invocation Policy = EITHER
            Any any = ORB.init().create_any();
            any.insert_short(EITHER);
            byte[] taggedComponentData = codec.encode_value(any);
            info.add_ior_component(new TaggedComponent(TAG_INV_POLICY, taggedComponentData));
            // OTS Policy = ADAPTS
            any = ORB.init().create_any();
            any.insert_short(ADAPTS);
View Full Code Here

            any.insert_short(EITHER);
            byte[] taggedComponentData = codec.encode_value(any);
            info.add_ior_component(new TaggedComponent(TAG_INV_POLICY, taggedComponentData));
            // OTS Policy = ADAPTS
            any = ORB.init().create_any();
            any.insert_short(ADAPTS);
            taggedComponentData = codec.encode_value(any);
            info.add_ior_component(new TaggedComponent(TAG_OTS_POLICY, taggedComponentData));
        } catch (InvalidTypeForEncoding e) {
            throw JacORBMessages.MESSAGES.errorEncodingContext(e);
        }
View Full Code Here

    {
        Any _lowVal = getORB().create_any();
        Any _highVal = getORB().create_any();

        _lowVal.insert_short(BestEffort.value);
        _highVal.insert_short(BestEffort.value);

        UnsupportedQoS _e = new UnsupportedQoS(new PropertyError[] { new PropertyError(
                QoSError_code.UNSUPPORTED_VALUE, property, new PropertyRange(_lowVal, _highVal)) });

        throw _e;
View Full Code Here

    {
        Any _lowVal = getORB().create_any();
        Any _highVal = getORB().create_any();

        _lowVal.insert_short(BestEffort.value);
        _highVal.insert_short(BestEffort.value);

        UnsupportedQoS _e = new UnsupportedQoS("The specified Property Value is not supported",
                new PropertyError[] { new PropertyError(QoSError_code.BAD_VALUE, property,
                        new PropertyRange(_lowVal, _highVal)) });
        throw _e;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.