Package org.switchyard.config.model.composite

Examples of org.switchyard.config.model.composite.ExtensionsModel


        }
        return serviceInterface;
    }

    private Throttling getCompositeServiceThrottling(CompositeServiceModel compositeServiceModel) {
        final ExtensionsModel extensions = compositeServiceModel.getExtensions();
        if (extensions == null) {
            return null;
        }
        final ThrottlingModel throttling = extensions.getThrottling();
        if (throttling == null) {
            return null;
        }
        final Long timePeriod = throttling.getTimePeriod();
        final Throttling retVal = new Throttling();
View Full Code Here


    }

    @Test
    public void testRead() throws Exception {
        SwitchYardModel switchyard = _puller.pull(THROTTLING_XML, getClass());
        ExtensionsModel extensions = switchyard.getComposite().getServices().get(0).getExtensions();
        ThrottlingModel throttling = extensions.getThrottling();

        Assert.assertEquals(MAX_REQUESTS, (Integer) throttling.getMaxRequests());
        Assert.assertEquals(TIME_PERIOD, throttling.getTimePeriod());
    }
View Full Code Here

    @Test
    public void testPropertySubstitution() throws Exception {
        System.setProperty("property.messages.per.poll", "50");
        SwitchYardModel switchyard = _puller.pull(THROTTLING_XML2, getClass());
        switchyard.assertModelValid();
        ExtensionsModel extensions = switchyard.getComposite().getServices().get(0).getExtensions();
        ThrottlingModel throttling = extensions.getThrottling();

        Assert.assertEquals(MAX_REQUESTS, (Integer) throttling.getMaxRequests());
        Assert.assertEquals(TIME_PERIOD, throttling.getTimePeriod());
    }
View Full Code Here

TOP

Related Classes of org.switchyard.config.model.composite.ExtensionsModel

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.