Package org.omg.CosNotification

Examples of org.omg.CosNotification.Property


    {
        // setup test data
        TypedEventMessage _event = new TypedEventMessage();

        _event.setTypedEvent(CoffeeHelper.id(), DRINKING_COFFEE_ID, new Property[] {
                new Property("name", toAny("alphonse")), new Property("minutes", toAny(10)) });

        // setup mock
        MockCoffee _mockCoffee = new MockCoffee()
        {
            public void drinking_coffee(String name, int minutes)
View Full Code Here


        structuredEvent_ = getTestUtils().getEmptyStructuredEvent();
    }

    public void testToTypedEvent() throws Exception
    {
        Property[] _props1 = new Property[] { new Property("operation", toAny("operationName")),
                new Property("p1", toAny("param1")), new Property("p2", toAny(20)) };

        structuredEvent_.filterable_data = _props1;

        objectUnderTest_.setStructuredEvent(structuredEvent_, false, false);
View Full Code Here

        assertEquals("operationName", _props2[0].value.extract_string());
    }

    public void testToTypedEvent_FailedConversion()
    {
        Property[] _props = new Property[] { new Property("p1", toAny("param1")),
                new Property("p2", toAny(20)) };

        structuredEvent_.filterable_data = _props;

        objectUnderTest_.setStructuredEvent(structuredEvent_, false, false);
View Full Code Here

        Any _any = getClientORB().create_any();
        UtcTHelper.insert(_any, Time.corbaTime(_time));

        structuredEvent_.header.variable_header = new Property[1];
        structuredEvent_.header.variable_header[0] = new Property(StopTime.value, _any);

        objectUnderTest_.setStructuredEvent(structuredEvent_, true, false);

        assertFalse(objectUnderTest_.hasStopTime());
    }
View Full Code Here

        Any _startTimeAny = getORB().create_any();
        UtcT _startTime = Time.corbaTime(_now);
        UtcTHelper.insert(_startTimeAny, _startTime);

        structuredEvent_.header.variable_header[0] = new Property(StartTime.value, _startTimeAny);

        Message _event = messageFactory_.newMessage(structuredEvent_, proxyConsumerMock_);

        assertTrue(_event.hasStartTime());
        assertEquals(_now.getTime(), _event.getStartTime());
View Full Code Here

        final Date _startTime = new Date(System.currentTimeMillis() + offset);

        Any _startTimeAny = getORB().create_any();
        UtcTHelper.insert(_startTimeAny, Time.corbaTime(_startTime));

        structuredEvent_.header.variable_header[0] = new Property(StartTime.value, _startTimeAny);

        final Message _event = messageFactory_.newMessage(structuredEvent_, proxyConsumerMock_);

        final CountDownLatch _latch = new CountDownLatch(1);
View Full Code Here

        _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();
View Full Code Here


    public void testExtractAny() throws Exception {
        Any _any = getORB().create_any();
        _any.insert_long(10);
        Property p = new Property("number", _any);
        Any _testData = getORB().create_any();
        PropertyHelper.insert(_testData, p);
        Any a = objectUnderTest_.evaluateIdentifier(_testData, "name");
        assertEquals("number", a.extract_string());
    }
View Full Code Here

    public void testEvaluateNamedValueList() throws Exception {
        Any _any = getORB().create_any();
        _any.insert_long(10);
        Property[] p = new Property[1];
        p[0] = new Property("number", _any);
        Any _testData = getORB().create_any();
        PropertySeqHelper.insert(_testData, p);
        Any _result = objectUnderTest_.evaluateNamedValueList(_testData, "number");
        Any _second = _result.extract_any();
        assertTrue(_second.extract_long() == 10);
View Full Code Here

    {
        IntHolder channelId = new IntHolder();

        Property[] qosProps;

        qosProps = new Property[] { new Property(DiscardPolicy.value, priorityOrder),
                new Property(OrderPolicy.value, priorityOrder) };

        getEventChannelFactory().create_channel(qosProps, new Property[0], channelId);
    }
View Full Code Here

TOP

Related Classes of org.omg.CosNotification.Property

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.