Package org.omg.CosNotification

Examples of org.omg.CosNotification.EventType


        for (int x=0; x<_exp.length; ++x) {
            _exp[x] = new ConstraintExp();
        }

        EventType[] _eventType = new EventType[2];
        _eventType[0] = new EventType("domain1", "type1");
        _eventType[1] = new EventType("domain2", "type2");
        _exp[0] = new ConstraintExp(_eventType, "1");
        objectUnderTest_.add_constraints(_exp);

        Iterator _i =
            objectUnderTest_.getIterator(AbstractMessage.calcConstraintKey("domain3", "type3"));
View Full Code Here


        for (int x=0; x<_exp.length; ++x) {
            _exp[x] = new ConstraintExp();
        }

        EventType[] _eventType = new EventType[2];
        _eventType[0] = new EventType("*", "*");
        _eventType[1] = new EventType("domain*", "type*");
        _exp[0] = new ConstraintExp(_eventType, "1");
        objectUnderTest_.add_constraints(_exp);

        Iterator _i =
            objectUnderTest_.getIterator(AbstractMessage.calcConstraintKey("domain1", "type1"));

        int _count = 0;
        while (_i.hasNext()) {
            _count++;
            ConstraintEntry _e = (ConstraintEntry)_i.next();
            assertEquals("1", _e.getConstraintInfo().constraint_expression.constraint_expr);
        }
        assertTrue(_count == 2);

        ConstraintExp[] _exp2 = new ConstraintExp[1];
        _exp2[0] = new ConstraintExp();

        EventType[] _eventType2 = new EventType[2];
        _eventType2[0] = new EventType("*", "*");
        _eventType2[1] = new EventType("domain*", "type*");
        _exp2[0] = new ConstraintExp(_eventType2, "2");
        objectUnderTest_.add_constraints(_exp2);

        _i = objectUnderTest_.getIterator(AbstractMessage.calcConstraintKey("domain1", "type1"));
        _count = 0;
View Full Code Here

        for (int x=0; x<_exp.length; ++x) {
            _exp[x] = new ConstraintExp();
        }

        EventType[] _eventType = new EventType[2];
        _eventType[0] = new EventType("*", "*");
        _eventType[1] = new EventType("domain*", "type*");
        _exp[0] = new ConstraintExp(_eventType, "1");
        objectUnderTest_.add_constraints(_exp);

        ConstraintExp[] _exp2 = new ConstraintExp[1];
        _exp2[0] = new ConstraintExp();

        EventType[] _eventType2 = new EventType[2];
        _eventType2[0] = new EventType("*", "*");
        _eventType2[1] = new EventType("domain*", "type*");
        _exp2[0] = new ConstraintExp(_eventType2, "2");

        ConstraintInfo[] _info = objectUnderTest_.add_constraints(_exp2);

        Iterator _i = objectUnderTest_.getIterator(AbstractMessage.calcConstraintKey("domain1", "type1"));
View Full Code Here

        structuredEvent_ = new StructuredEvent();
        EventHeader _header = new EventHeader();
        FixedEventHeader _fixed = new FixedEventHeader();
        _fixed.event_name = "eventname";
        _fixed.event_type = new EventType("domain", "type");
        _header.fixed_header = _fixed;
        _header.variable_header = new Property[0];

        structuredEvent_.header = _header;
View Full Code Here

    {
        channel_ = getDefaultChannel();

        // set test event type and name
        testEvent_ = new StructuredEvent();
        EventType _type = new EventType("testDomain", "testType");
        FixedEventHeader _fixed = new FixedEventHeader(_type, "testing");

        // complete header date
        Property[] _variable = new Property[0];
        testEvent_.header = new EventHeader(_fixed, _variable);

        // set filterable event body data
        testEvent_.filterable_data = new Property[1];

        Any _personAny = getClientORB().create_any();

        // prepare filterable body data
        Person _p = new NotificationTestUtils(getClientORB()).getTestPerson();
        Address _a = new Address();

        _p.first_name = "firstname";
        _p.last_name = "lastname";
        _p.age = 5;
        _p.phone_numbers = new String[2];
        _p.phone_numbers[0] = "12345678";
        _p.phone_numbers[1] = "";
        _p.nv = new NamedValue[2];
        _p.nv[0] = new NamedValue();
        _p.nv[1] = new NamedValue();
        _p.person_profession = Profession.STUDENT;
        _a.street = "Takustr.";
        _a.number = 9;
        _a.city = "Berlin";
        _p.home_address = _a;

        PersonHelper.insert(_personAny, _p);
        testEvent_.filterable_data[0] = new Property("person", _personAny);

        testEvent_.remainder_of_body = getClientORB().create_any();

        trueFilter_ = createFilter();

        ConstraintExp[] _constraintExp = new ConstraintExp[1];
        EventType[] _eventType = new EventType[1];
        _eventType[0] = new EventType("*", "*");

        _constraintExp[0] = new ConstraintExp(_eventType, "true");
        trueFilter_.add_constraints(_constraintExp);

        falseFilter_ = createFilter();

        _constraintExp = new ConstraintExp[1];
        _eventType = new EventType[1];
        _eventType[0] = new EventType("*", "*");

        _constraintExp[0] = new ConstraintExp(_eventType, "false");
        falseFilter_.add_constraints(_constraintExp);       
    }
View Full Code Here

        _receiver.connect(channel_, false);

        assertEquals(0, _sender.pushConsumer_.obtain_subscription_types(ObtainInfoMode.NONE_NOW_UPDATES_ON).length);

        EventType[] offers = new EventType[] { new EventType("domain1", "type1") };

        _receiver.pushSupplier_.subscription_change(offers, EMPTY_EVENT_TYPE);

        offers = new EventType[] { new EventType("domain2", "type2") };

        _receiver.pushSupplier_.subscription_change(offers, EMPTY_EVENT_TYPE);

        Thread.sleep(1000);
View Full Code Here

        _sender.connect(channel_, false);
        _receiver.connect(channel_, false);

        assertEquals(0, _sender.pushConsumer_.obtain_subscription_types(ObtainInfoMode.NONE_NOW_UPDATES_ON).length);

        EventType[] offers = new EventType[] { new EventType("domain1", "type1") };

        _receiver.pushSupplier_.subscription_change(offers, EMPTY_EVENT_TYPE);

        Thread.sleep(1000);
View Full Code Here

        StructuredPushReceiver _receiver = new StructuredPushReceiver(getClientORB());

        _sender.connect(channel_, false);
        _receiver.connect(channel_, false);

        EventType[] offers = new EventType[] { new EventType("domain1", "type1") };

        _receiver.pushSupplier_.subscription_change(offers, EMPTY_EVENT_TYPE);

        EventType[] _subscriptionTypes = _sender.pushConsumer_
                .obtain_subscription_types(ObtainInfoMode.ALL_NOW_UPDATES_ON);
View Full Code Here

        _sender.connect(channel_, false);
        _receiver.connect(channel_, false);

        assertEquals(0, _receiver.pushSupplier_.obtain_offered_types(ObtainInfoMode.NONE_NOW_UPDATES_ON).length);

        EventType[] offers = new EventType[] { new EventType("domain1", "type1") };

        _sender.pushConsumer_.offer_change(offers, EMPTY_EVENT_TYPE);

        Thread.sleep(1000);
View Full Code Here

        StructuredPushReceiver _receiver = new StructuredPushReceiver(getClientORB());

        _sender.connect(channel_, false);
        _receiver.connect(channel_, false);

        EventType[] offers = new EventType[] { new EventType("domain1", "type1"),
                new EventType("domain2", "type2") };

        _sender.pushConsumer_.offer_change(offers, EMPTY_EVENT_TYPE);

        EventType[] _offeredTypes = _receiver.pushSupplier_
                .obtain_offered_types(ObtainInfoMode.ALL_NOW_UPDATES_ON);
View Full Code Here

TOP

Related Classes of org.omg.CosNotification.EventType

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.