Package org.apache.camel

Examples of org.apache.camel.ComponentConfiguration.createEndpoint()


        configuration.setParameter("updateTopic", false);

        // operation name is base uri
        configuration.setBaseUri("getSObject");

        SalesforceEndpoint endpoint = assertIsInstanceOf(SalesforceEndpoint.class, configuration.createEndpoint());
        final SalesforceEndpointConfig endpointConfig = endpoint.getConfiguration();
        assertEquals("endpoint.format", PayloadFormat.XML, endpointConfig.getFormat());
        assertEquals("endpoint.sObjectName", "Merchandise__c", endpointConfig.getSObjectName());
        assertEquals("endpoint.sObjectFields", "Description__c,Total_Inventory__c", endpointConfig.getSObjectFields());
        assertEquals("endpoint.updateTopic", false, endpointConfig.isUpdateTopic());
View Full Code Here


        configuration.setParameter("concurrentConsumers", 10);
        configuration.setParameter("clientId", "foo");
        configuration.setParameter("disableReplyTo", true);
        configuration.setParameter("timeToLive", 1000L);

        JmsEndpoint endpoint = assertIsInstanceOf(JmsEndpoint.class, configuration.createEndpoint());
        assertEquals("endpoint.concurrentConsumers", 10, endpoint.getConcurrentConsumers());
        assertEquals("endpoint.clientId", "foo", endpoint.getClientId());
        assertEquals("endpoint.disableReplyTo", true, endpoint.isDisableReplyTo());
        assertEquals("endpoint.timeToLive", 1000L, endpoint.getTimeToLive());
    }
View Full Code Here

        } catch (InvalidPropertyException e) {
            LOG.info("Got expected exception: " + e);
        }

        SedaEndpoint endpoint = TestSupport
                .assertIsInstanceOf(SedaEndpoint.class, configuration.createEndpoint());
        assertEquals("concurrentConsumers", 5, endpoint.getConcurrentConsumers());
        assertEquals("size", 1000, endpoint.getSize());

        assertEquals("endpoint uri", "foo?concurrentConsumers=5&size=1000", endpoint.getEndpointUri());
View Full Code Here

        // lets try set and get a valid parameter
        configuration.setParameter("foo", "xyz");
        configuration.setParameter("bar", 5);

        NonUriEndpoint endpoint = TestSupport
                .assertIsInstanceOf(NonUriEndpoint.class, configuration.createEndpoint());
        assertEquals("foo", "xyz", endpoint.getFoo());
        assertEquals("bar", 5, endpoint.getBar());

        LOG.info("Created endpoint " + endpoint + " on URI " + endpoint.getEndpointUri());
View Full Code Here

        // creates its own configuration object so this always works...
        badConfiguration.setParameter("doesNotExist", 1000);

        // however it fails if we now try create an
        try {
            badConfiguration.createEndpoint();
            fail("Should have got ResolveEndpointFailedException thrown!");
        } catch (ResolveEndpointFailedException e) {
            LOG.info("Got expected exception: " + e);
        }
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.