Examples of RuntimeEndpointRegistry


Examples of org.apache.camel.spi.RuntimeEndpointRegistry

        UnitOfWorkFactory unitOfWorkFactory = getBeanForType(UnitOfWorkFactory.class);
        if (unitOfWorkFactory != null) {
            LOG.info("Using custom UnitOfWorkFactory: {}", unitOfWorkFactory);
            getContext().setUnitOfWorkFactory(unitOfWorkFactory);
        }
        RuntimeEndpointRegistry runtimeEndpointRegistry = getBeanForType(RuntimeEndpointRegistry.class);
        if (runtimeEndpointRegistry != null) {
            LOG.info("Using custom RuntimeEndpointRegistry: {}", runtimeEndpointRegistry);
            getContext().setRuntimeEndpointRegistry(runtimeEndpointRegistry);
        }
        // set the event notifier strategies if defined
View Full Code Here

Examples of org.apache.camel.spi.RuntimeEndpointRegistry

        UnitOfWorkFactory unitOfWorkFactory = getBeanForType(UnitOfWorkFactory.class);
        if (unitOfWorkFactory != null) {
            LOG.info("Using custom UnitOfWorkFactory: {}", unitOfWorkFactory);
            getContext().setUnitOfWorkFactory(unitOfWorkFactory);
        }
        RuntimeEndpointRegistry runtimeEndpointRegistry = getBeanForType(RuntimeEndpointRegistry.class);
        if (runtimeEndpointRegistry != null) {
            LOG.info("Using custom RuntimeEndpointRegistry: {}", runtimeEndpointRegistry);
            getContext().setRuntimeEndpointRegistry(runtimeEndpointRegistry);
        }
        // set the event notifier strategies if defined
View Full Code Here

Examples of org.apache.camel.spi.RuntimeEndpointRegistry

import org.apache.camel.spi.RuntimeEndpointRegistry;

public class RuntimeEndpointRegistryTest extends ContextTestSupport {

    public void testRuntimeEndpointRegistry() throws Exception {
        RuntimeEndpointRegistry registry = context.getRuntimeEndpointRegistry();
        assertEquals(0, registry.getAllEndpoints(false).size());
        // we have 2 at the start as we have all endpoints for the route consumers
        assertEquals(2, registry.getAllEndpoints(true).size());

        MockEndpoint mock = getMockEndpoint("mock:foo2");
        mock.expectedMessageCount(1);
        template.sendBodyAndHeader("seda:foo", "Hello World", "slip", "mock:foo2");
        mock.assertIsSatisfied();

        assertEquals(4, registry.getAllEndpoints(true).size());
        assertEquals(3, registry.getEndpointsPerRoute("foo", true).size());
        assertEquals(1, registry.getEndpointsPerRoute("bar", true).size());

        mock = getMockEndpoint("mock:bar2");
        mock.expectedMessageCount(1);
        template.sendBodyAndHeader("seda:bar", "Bye World", "slip", "mock:bar2");
        mock.assertIsSatisfied();

        assertEquals(6, registry.getAllEndpoints(true).size());
        assertEquals(3, registry.getEndpointsPerRoute("foo", true).size());
        assertEquals(3, registry.getEndpointsPerRoute("bar", true).size());

        // lets check the json
        String json = context.createRouteStaticEndpointJson(null);
        assertNotNull(json);
        log.info(json);
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.