Package org.omg.CORBA

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


       
        Any otsAny = ORB.init().create_any();
        Any invAny = ORB.init().create_any();
       
        otsAny.insert_short(otsPolicyValue);
        invAny.insert_short(invPolicyValue);
       
        byte[] otsCompValue = null;
        byte[] invCompValue = null;                
        try {
            otsCompValue = codec.encode_value(otsAny);
View Full Code Here


    public void establish_components(IORInfo info) {

        try {
            Any invAny = ORB.init().create_any();
            invAny.insert_short(SHARED.value);
            byte[] invBytes = Util.getCodec().encode_value(invAny);
            TaggedComponent invocationPolicyComponent = new TaggedComponent(TAG_INV_POLICY.value, invBytes);
            info.add_ior_component_to_profile(invocationPolicyComponent, TAG_INTERNET_IOP.value);

            Any otsAny = ORB.init().create_any();
View Full Code Here

            byte[] invBytes = Util.getCodec().encode_value(invAny);
            TaggedComponent invocationPolicyComponent = new TaggedComponent(TAG_INV_POLICY.value, invBytes);
            info.add_ior_component_to_profile(invocationPolicyComponent, TAG_INTERNET_IOP.value);

            Any otsAny = ORB.init().create_any();
            otsAny.insert_short(ADAPTS.value);
            byte[] otsBytes = Util.getCodec().encode_value(otsAny);
            TaggedComponent otsPolicyComponent = new TaggedComponent(TAG_OTS_POLICY.value, otsBytes);
            info.add_ior_component_to_profile(otsPolicyComponent, TAG_INTERNET_IOP.value);
        } catch (INV_POLICY e) {
            // do nothing
View Full Code Here

    protected void setServerPolicy() throws PolicyError
    {
        // create a sync scope policy
        Any syncPolicyAny = orb.create_any();
        syncPolicyAny.insert_short( SYNC_WITH_SERVER.value );

        Policy syncPolicy =
            orb.create_policy
                ( SYNC_SCOPE_POLICY_TYPE.value, syncPolicyAny  );
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

            case TCKind._tk_ulong:
                _any.insert_ulong(discriminator);
                break;

            case TCKind._tk_short:
                _any.insert_short((short) discriminator);
                break;

            case TCKind._tk_double:
                _any.insert_double(discriminator);
                break;
View Full Code Here

    @Test
    public void testQueueOrderPolicy()
    {
        Any value = create_any();
        value.insert_short((short)0xffff);
        QueueOrderPolicy p = (QueueOrderPolicy)create_policy
        (
            org.omg.Messaging.QUEUE_ORDER_POLICY_TYPE.value,
            value
        );
View Full Code Here

    @Test
    public void testRebindPolicy()
    {
        Any value = create_any();
        value.insert_short((short)0xffff);
        RebindPolicy p = (RebindPolicy)create_policy
        (
            org.omg.Messaging.REBIND_POLICY_TYPE.value,
            value
        );
View Full Code Here

    @Test
    public void testSyncScopePolicy()
    {
        Any value = create_any();
        value.insert_short((short)0xffff);
        SyncScopePolicy p = (SyncScopePolicy)create_policy
        (
            org.omg.Messaging.SYNC_SCOPE_POLICY_TYPE.value,
            value
        );
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.