Package org.apache.camel.impl

Examples of org.apache.camel.impl.SimpleRegistry


        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


    }

    @Test(expected = FailedToCreateRouteException.class)
    public void shouldFailWhenThereIsNoJobLauncher() throws Exception {
        // Given
        SimpleRegistry registry = new SimpleRegistry();
        registry.put("mockJob", job);
        CamelContext camelContext = new DefaultCamelContext(registry);
        camelContext.addRoutes(new RouteBuilder() {
            @Override
            public void configure() throws Exception {
                from("direct:start").to("spring-batch:mockJob");
View Full Code Here

    }

    @Test(expected = FailedToCreateRouteException.class)
    public void shouldFailWhenThereIsMoreThanOneJobLauncher() throws Exception {
        // Given
        SimpleRegistry registry = new SimpleRegistry();
        registry.put("mockJob", job);
        registry.put("launcher1", jobLauncher);
        registry.put("launcher2", jobLauncher);
        CamelContext camelContext = new DefaultCamelContext(registry);
        camelContext.addRoutes(new RouteBuilder() {
            @Override
            public void configure() throws Exception {
                from("direct:start").to("spring-batch:mockJob");
View Full Code Here

    }

    @Test
    public void shouldResolveAnyJobLauncher() throws Exception {
        // Given
        SimpleRegistry registry = new SimpleRegistry();
        registry.put("mockJob", job);
        registry.put("someRandomName", jobLauncher);
        CamelContext camelContext = new DefaultCamelContext(registry);
        camelContext.addRoutes(new RouteBuilder() {
            @Override
            public void configure() throws Exception {
                from("direct:start").to("spring-batch:mockJob");
View Full Code Here

        // you can assign port number in the @CreateTransport annotation
        port = ldapServer.getPort();

        LdapContext ctx = getWiredContext(ldapServer);

        SimpleRegistry reg = new SimpleRegistry();
        reg.put("localhost:" + port, ctx);
        camel = new DefaultCamelContext(reg);
        template = camel.createProducerTemplate();
    }
View Full Code Here

    private GAuthTestUtils() {
    }
   
    public static GAuthComponent createComponent() {
        SimpleRegistry registry = new SimpleRegistry();
        registry.put("customAuthorizeBinding", new GAuthAuthorizeBinding() { })// subclass
        registry.put("customUpgradeBinding", new GAuthUpgradeBinding() { })// subclass
        registry.put("gAuthKeyLoader", new GAuthPk8Loader());
        registry.put("gAuthService", new GAuthServiceMock());
        CamelContext context = new DefaultCamelContext(registry);
        GAuthComponent component = new GAuthComponent();
        component.setConsumerKey("testConsumerKey");
        component.setConsumerSecret("testConsumerSecret");
        component.setCamelContext(context);
View Full Code Here

        // you can assign port number in the @CreateTransport annotation
        port = ldapServer.getPort();

        LdapContext ctx = getWiredContext(ldapServer);

        SimpleRegistry reg = new SimpleRegistry();
        reg.put("localhost:" + port, ctx);
        camel = new DefaultCamelContext(reg);
        template = camel.createProducerTemplate();
    }
View Full Code Here

    }

    @Test(expected = FailedToCreateRouteException.class)
    public void shouldFailWhenThereIsNoJobLauncher() throws Exception {
        // Given
        SimpleRegistry registry = new SimpleRegistry();
        registry.put("mockJob", job);
        CamelContext camelContext = new DefaultCamelContext(registry);
        camelContext.addRoutes(new RouteBuilder() {
            @Override
            public void configure() throws Exception {
                from("direct:start").to("spring-batch:mockJob");
View Full Code Here

    }

    @Test(expected = FailedToCreateRouteException.class)
    public void shouldFailWhenThereIsMoreThanOneJobLauncher() throws Exception {
        // Given
        SimpleRegistry registry = new SimpleRegistry();
        registry.put("mockJob", job);
        registry.put("launcher1", jobLauncher);
        registry.put("launcher2", jobLauncher);
        CamelContext camelContext = new DefaultCamelContext(registry);
        camelContext.addRoutes(new RouteBuilder() {
            @Override
            public void configure() throws Exception {
                from("direct:start").to("spring-batch:mockJob");
View Full Code Here

    }

    @Test
    public void shouldResolveAnyJobLauncher() throws Exception {
        // Given
        SimpleRegistry registry = new SimpleRegistry();
        registry.put("mockJob", job);
        registry.put("someRandomName", jobLauncher);
        CamelContext camelContext = new DefaultCamelContext(registry);
        camelContext.addRoutes(new RouteBuilder() {
            @Override
            public void configure() throws Exception {
                from("direct:start").to("spring-batch:mockJob");
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.