Package org.switchyard.component.camel.common.model.v1

Examples of org.switchyard.component.camel.common.model.v1.V1AdditionalUriParametersModel


    @Override
    public V1CamelImplementationModel setJavaClass(String className) {
        Configuration classConfig = getModelConfiguration().getFirstChild(JAVA);
        if (classConfig == null) {
            NameValueModel model = new NameValueModel(getNamespaceURI(), JAVA);
            model.getModelConfiguration().setAttribute(CLASS, className);
            setChildModel(model);
        } else {
            classConfig.setAttribute(CLASS, className);
        }
        return this;
View Full Code Here


    @Override
    public CamelComponentImplementationModel setXMLPath(String path) {
        Configuration pathConfig = getModelConfiguration().getFirstChild(XML);
        if (pathConfig == null) {
            NameValueModel model = new NameValueModel(getNamespaceURI(), XML);
            model.getModelConfiguration().setAttribute(PATH, path);
            setChildModel(model);
        } else {
            pathConfig.setAttribute(PATH, path);
        }
        return this;
View Full Code Here

        return context.getEndpoint(configUri, enpointType);
    }

    protected static AdditionalUriParametersModel createAdditionalUriParametersModel(String namespace,
            Map<String, String> parameters) {
        final AdditionalUriParametersModel retVal = new V1AdditionalUriParametersModel(namespace);
        for (Entry<String, String> entry : parameters.entrySet()) {
            retVal.addParameter(new V1ParameterModel(namespace).setName(entry.getKey()).setValue(entry.getValue()));
        }
        return retVal;

    }
View Full Code Here

        return createInboundHandler(uri, name, null, null, mapperModel);
    }

    protected InboundHandler<?> createInboundHandler(final String uri, final String name, final OperationSelectorModel selectorModel,
        final MessageComposerModel composerModel, final ContextMapperModel mapperModel) {
        V1BaseCamelBindingModel camelBindingModel = new V1BaseCamelBindingModel(_configuration, new Descriptor()) {
            @Override
            public String getName() {
                return name;
            }
            @Override
View Full Code Here

        return createInboundHandler(serviceName, uri, name, null, null, mapperModel);
    }

    protected InboundHandler<?> createInboundHandler(QName serviceName, final String uri, final String name, final OperationSelectorModel selectorModel,
        final MessageComposerModel composerModel, final ContextMapperModel mapperModel) {
        V1BaseCamelBindingModel camelBindingModel = new V1BaseCamelBindingModel(_configuration, new Descriptor()) {
            @Override
            public String getName() {
                return name;
            }
            @Override
View Full Code Here

        CamelScheduledBatchPollConsumer model = createModel();
        assertEquals(MAX_MESSAGES_PER_POLL, model.getMaxMessagesPerPoll());
    }

    private CamelScheduledBatchPollConsumer createModel() {
        return new V1CamelScheduledBatchPollConsumer("test", "test")
            .setMaxMessagesPerPoll(MAX_MESSAGES_PER_POLL);
    }
View Full Code Here

    private static final Integer INITIAL_DELAY = 999;
    private static final Boolean USE_FIXED_DELAY = true;

    @Test
    public void testConfigOverride() {
        V1CamelScheduledPollConsumer model = createModel();
        assertEquals(DELAY, model.getDelay());
        assertEquals(INITIAL_DELAY, model.getInitialDelay());
        assertEquals(TIME_UNIT, model.getTimeUnit());
        assertEquals(SEND_EMPTY_MESSAGE_WHEN_IDLE, model.isSendEmptyMessageWhenIdle());
        assertEquals(USE_FIXED_DELAY, model.isUseFixedDelay());
        model.setDelay(750);
        assertEquals(new Integer(750), model.getDelay());
    }
View Full Code Here

        model.setDelay(750);
        assertEquals(new Integer(750), model.getDelay());
    }

    private V1CamelScheduledPollConsumer createModel() {
        return new V1CamelScheduledPollConsumer("test", "test")
            .setDelay(DELAY)
            .setInitialDelay(INITIAL_DELAY)
            .setTimeUnit(TIME_UNIT.name())
            .setSendEmptyMessageWhenIdle(SEND_EMPTY_MESSAGE_WHEN_IDLE)
            .setUseFixedDelay(USE_FIXED_DELAY);
View Full Code Here

            .setLastUpdate(referenceDate)
            .setThrottleEntries(THROTTLED)
            .setFeedHeader(FEED_HEADER)
            .setSortEntries(SORTED);

        CamelScheduledPollConsumer consumer = new V1CamelScheduledPollConsumer(CamelAtomNamespace.V_1_0.uri(), V1CamelAtomBindingModel.CONSUME)
            .setInitialDelay(20000)
            .setDelay(15000)
            .setUseFixedDelay(true);
        return abm.setConsumer(consumer);
    }
View Full Code Here

            .setLastUpdate(referenceDate)
            .setThrottleEntries(THROTTLED)
            .setFeedHeader(FEED_HEADER)
            .setSortEntries(SORTED);

        CamelScheduledPollConsumer consumer = new V1CamelScheduledPollConsumer(CamelRSSNamespace.V_2_0.uri(), V2CamelRSSBindingModel.CONSUME)
            .setInitialDelay(20000)
            .setDelay(15000)
            .setUseFixedDelay(true);
        return abm.setConsumer(consumer);
    }
View Full Code Here

TOP

Related Classes of org.switchyard.component.camel.common.model.v1.V1AdditionalUriParametersModel

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.