Package org.omg.CosNotification

Examples of org.omg.CosNotification.EventType


    private void attachFilter(String filterExpr) throws InvalidConstraint
    {
        ConstraintExp[] _constraintExp = new ConstraintExp[1];
        EventType[] _eventType = new EventType[1];
        _eventType[0] = new EventType("*", "*");

        _constraintExp[0] = new ConstraintExp(_eventType, filterExpr);
        objectUnderTest_.add_constraints(_constraintExp);
    }
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);

        _sender.pushConsumer_.obtain_subscription_types(ObtainInfoMode.NONE_NOW_UPDATES_ON);

        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);

        _sender.pushConsumer_.obtain_subscription_types(ObtainInfoMode.NONE_NOW_UPDATES_ON);

        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);

        _receiver.pushSupplier_.obtain_offered_types(ObtainInfoMode.NONE_NOW_UPDATES_ON);

        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

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

        _receiver.pushSupplier_.obtain_offered_types(ObtainInfoMode.NONE_NOW_UPDATES_ON);

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

        _sender.pushConsumer_.offer_change(offers, EMPTY_EVENT_TYPE);

        offers = new EventType[] { new EventType("domain3", "type3"),
                new EventType("domain4", "type4") };

        _sender.pushConsumer_.offer_change(offers, EMPTY_EVENT_TYPE);

        assertEquals(1, offerChangeCalled.get());
    }
View Full Code Here

        controlSubscription_.verify();
    }

    public void testAddNonExistingDoesNotify() throws Exception
    {
        EventType[] added = new EventType[] { new EventType("domain", "type") };

        mockSubscription_.subscription_change(added, EMPTY);
        controlSubscription_.setMatcher(MockControl.ARRAY_MATCHER);

        controlSubscription_.replay();
View Full Code Here

        controlSubscription_.verify();
    }

    public void testDeleteNonExistingDoesNotNotify() throws Exception
    {
        EventType[] removed = new EventType[] { new EventType("domain", "type") };

        controlSubscription_.replay();

        objectUnderTest_.attach_callback(mockSubscription_);
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.