Package org.omg.CosNotification

Examples of org.omg.CosNotification.Property


    {
        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


    {
        IntHolder channelId = new IntHolder();

        Property[] qosProps;

        qosProps = new Property[] { new Property(ConnectionReliability.value, bestEffort),
                new Property(EventReliability.value, bestEffort) };

        getEventChannelFactory().create_channel(qosProps, new Property[0], channelId);

        qosProps = new Property[] { new Property(ConnectionReliability.value, persistent),
                new Property(EventReliability.value, persistent) };

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

        // create and setup channel
        IntHolder channelId = new IntHolder();

        Property[] qosProps;

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

        EventChannel channel = getEventChannelFactory().create_channel(qosProps, new Property[0], channelId);

        // testdata
        StructuredEvent[] events = new StructuredEvent[10];
        for (int x = 0; x < events.length; ++x)
        {
            events[x] = new NotificationTestUtils(getClientORB()).getStructuredEvent();

            Any priority = getClientORB().create_any();
            priority.insert_short((short) x);

            events[x].header.variable_header = new Property[] { new Property(Priority.value,
                    priority) };

        }

        final List received = new ArrayList();
View Full Code Here

        _mod2.join();
    }

    public void testMatchTyped() throws Exception
    {
        Property[] _props = new Property[] { new Property("operation", toAny("operationName")),
                new Property("value1", toAny(100)), new Property("value2", toAny(200)) };

        ConstraintExp[] _constraintExp = new ConstraintExp[1];

        EventType[] _eventType = new EventType[1];
        _eventType[0] = new EventType("", "%TYPED");
View Full Code Here

        String _domainName = "IDL:org.jacorb/org/jacorb/test/filter/Bla:1.0";
        String _operationName = "blaOperation";

        _mesg.setTypedEvent(_domainName, _operationName, new Property[] {
                new Property("param1", toAny("value1")), new Property("param2", toAny(100)) });

        assertFalse(_mesg.match(filter_));

        ConstraintExp[] _constraintExp = new ConstraintExp[1];
View Full Code Here

    public void testValidateQoS() throws Exception
    {
        Property[] _props = new Property[3];
        Any _bestEffortAny = getORB().create_any();
        _bestEffortAny.insert_short(BestEffort.value);
        _props[0] = new Property(ConnectionReliability.value, _bestEffortAny);

        Any _priorityAny = getORB().create_any();
        _priorityAny.insert_short((short) 20);
        _props[1] = new Property(Priority.value, _priorityAny);

        Any _discardPolicyAny = getORB().create_any();
        _discardPolicyAny.insert_short(FifoOrder.value);

        _props[2] = new Property(DiscardPolicy.value, _discardPolicyAny);

        ////////////////////////////////////////

        objectUnderTest_.validate_qos(_props, new NamedPropertyRangeSeqHolder());

        ////////////////////////////////////////

        _props[2] = new Property("OtherPolicy", _discardPolicyAny);
        try
        {
            objectUnderTest_.validate_qos(_props, new NamedPropertyRangeSeqHolder());
            fail();
        } catch (UnsupportedQoS e)
        {
            // expected
        }

        ////////////////////////////////////////

        Any wrongType = getORB().create_any();
        wrongType.insert_long(10);
        _props[2] = new Property(DiscardPolicy.value, wrongType);
        try
        {
            objectUnderTest_.validate_qos(_props, new NamedPropertyRangeSeqHolder());
            fail();
        } catch (UnsupportedQoS ex)
View Full Code Here

    public void testDisable_StopTimeSupported() throws Exception
    {
        Any falseAny = getClientORB().create_any();
        falseAny.insert_boolean(false);

        Property[] props = new Property[] { new Property(StopTimeSupported.value, falseAny) };
        EventChannel channel = getEventChannelFactory().create_channel(props, new Property[0], new IntHolder());

        sendEvent(channel, 1000, 500, true);
    }
View Full Code Here

        Date _time = new Date(System.currentTimeMillis() + startDelay);

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

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

        _time = new Date(System.currentTimeMillis() + stopOffset);

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

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

        StructuredPushSender _sender = new StructuredPushSender(getClientORB());
        _sender.setStructuredEvent(new StructuredEvent[] {structuredEvent_});

        StructuredPushReceiver _receiver = new StructuredPushReceiver(getClientORB());
View Full Code Here

        Any _any = getORB().create_any();
        UtcT _utc = Time.corbaTime(_now);
        UtcTHelper.insert(_any, _utc);

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

        MockControl proxyConsumerControl = MockControl.createNiceControl(IProxyConsumer.class);
        IProxyConsumer proxyConsumerMock = (IProxyConsumer) proxyConsumerControl.getMock();
       
        proxyConsumerControl.expectAndReturn(proxyConsumerMock.getStopTimeSupported(), true);
View Full Code Here

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

        _event.setTypedEvent(PullCoffeeHelper.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

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.