Package org.apache.camel.impl

Examples of org.apache.camel.impl.SimpleRegistry


        assertEquals("CamelCxfClientImpl should has the same bus with CxfEndpoint", newBus, client.getBus());
    }
   
    @Test
    public void testCxfEndpointConfigurer() throws Exception {
        SimpleRegistry registry = new SimpleRegistry();
        CxfEndpointConfigurer configurer = EasyMock.createMock(CxfEndpointConfigurer.class);
        Processor processor = EasyMock.createMock(Processor.class);
        registry.put("myConfigurer", configurer);
        CamelContext camelContext = new DefaultCamelContext(registry);
        CxfComponent cxfComponent = new CxfComponent(camelContext);
        CxfEndpoint endpoint = (CxfEndpoint)cxfComponent.createEndpoint(routerEndpointURI + "&cxfEndpointConfigurer=#myConfigurer");
       
        configurer.configure(EasyMock.isA(AbstractWSDLBasedEndpointFactory.class));
View Full Code Here


    }

    @Before
    public void setUp() throws Exception {
        camelContext = new DefaultCamelContext();
        SimpleRegistry registry = new SimpleRegistry();
        Map<String, Object> params = new HashMap<String, Object>();
        params.put("custName", "Willem");
        // bind the params
        registry.put("params", params);
        camelContext.setRegistry(registry);
       
        template = camelContext.createProducerTemplate();
        ServiceHelper.startServices(template, camelContext);
View Full Code Here

        assertEquals("CamelCxfClientImpl should has the same bus with CxfEndpoint", newBus, client.getBus());
    }
   
    @Test
    public void testCxfEndpointConfigurer() throws Exception {
        SimpleRegistry registry = new SimpleRegistry();
        CxfEndpointConfigurer configurer = EasyMock.createMock(CxfEndpointConfigurer.class);
        Processor processor = EasyMock.createMock(Processor.class);
        registry.put("myConfigurer", configurer);
        CamelContext camelContext = new DefaultCamelContext(registry);
        CxfComponent cxfComponent = new CxfComponent(camelContext);
        CxfEndpoint endpoint = (CxfEndpoint)cxfComponent.createEndpoint(routerEndpointURI + "&cxfEndpointConfigurer=#myConfigurer");
       
        configurer.configure(EasyMock.isA(AbstractWSDLBasedEndpointFactory.class));
View Full Code Here

        setThreadContextClassLoader();

        CamelContextFactory factory = new CamelContextFactory();
        factory.setBundleContext(bundleContext);
        SimpleRegistry registry = new SimpleRegistry();
        registry.put("mylogger1", LoggerFactory.getLogger("org.apache.camel.SIFT.l1"));
        registry.put("mylogger2", LoggerFactory.getLogger("org.apache.camel.SIFT.l2"));
        factory.setRegistry(registry);
        CamelContext camelContext = factory.createContext();
        camelContext.setApplicationContextClassLoader(getClass().getClassLoader());
        camelContext.setUseMDCLogging(true);
        return camelContext;
View Full Code Here

        setThreadContextClassLoader();

        CamelContextFactory factory = new CamelContextFactory();
        factory.setBundleContext(bundleContext);
        SimpleRegistry registry = new SimpleRegistry();
        registry.put("mylogger", LoggerFactory.getLogger("org.apache.camel.SIFT"));
        factory.setRegistry(registry);
        CamelContext camelContext = factory.createContext();
        camelContext.setApplicationContextClassLoader(getClass().getClassLoader());
        camelContext.setUseMDCLogging(true);
        return camelContext;
View Full Code Here

        assertSame(configuration, component.getConfiguration());
    }
   
    @Test
    public void createEndpointWithSessionStateListener() throws Exception {
        SimpleRegistry registry = new SimpleRegistry();
        registry.put("sessionStateListener", new SessionStateListener() {
            public void onStateChange(SessionState arg0, SessionState arg1, Object arg2) {
            }
        });
        context.setRegistry(registry);
        component = new SmppComponent(context);
View Full Code Here

                return new DefaultPropertiesResolver().resolveProperties(context, ignoreMissingLocation, uri);
            }
        });

        // put the properties component into the registry so that it survives restarts
        SimpleRegistry registry = new SimpleRegistry();
        registry.put("properties", pc);

        return new DefaultCamelContext(registry);
    }
View Full Code Here

        assertEquals("Bye World", bodies.get(1));
    }

    @Override
    protected CamelContext createCamelContext() throws Exception {
        SimpleRegistry reg = new SimpleRegistry();
        CamelContext context = new DefaultCamelContext(reg);

        foo = context.getEndpoint("mock:foo");
        bar = context.getEndpoint("mock:bar");
        reg.put("foo", foo);
        reg.put("coolbar", bar);

        return context;
    }
View Full Code Here

    private CamelContext context;

    protected CamelContext createCamelContext() throws Exception {

        // First we register a blog service in our bean registry
        SimpleRegistry registry = new SimpleRegistry();
        registry.put("blogService", new BlogService());

        // Then we create the camel context with our bean registry
        context = new DefaultCamelContext(registry);

        // Then we add all the routes we need using the route builder DSL syntax
View Full Code Here

public class GreaterCamelEjbPropertiesTest extends CamelTestSupport {

    @Override
    protected CamelContext createCamelContext() throws Exception {
        // use simple registry to not conflict with jndi used by EJB
        CamelContext answer = new DefaultCamelContext(new SimpleRegistry());

        // enlist EJB component using JndiContext
        Properties properties = new Properties();
        properties.setProperty(Context.INITIAL_CONTEXT_FACTORY, "org.apache.openejb.client.LocalInitialContextFactory");
View Full Code Here

TOP

Related Classes of org.apache.camel.impl.SimpleRegistry

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.