Examples of CamelContext

Notice: {@link #stop()} and {@link #suspend()} will gracefully stop/suspend routes ensuring any messagesin progress will be given time to complete. See more details at {@link org.apache.camel.spi.ShutdownStrategy}.

If you are doing a hot restart then it's advised to use the suspend/resume methods which ensure a faster restart but also allows any internal state to be kept as is. The stop/start approach will do a cold restart of Camel, where all internal state is reset.

End users are advised to use suspend/resume. Using stop is for shutting down Camel and it's not guaranteed that when it's being started again using the start method that Camel will operate consistently. @version


Examples of org.apache.camel.CamelContext

            assertTrue(nsee.getMessage(), nsee.getMessage().endsWith("at the index 1"));
        }
    }

    public void testGetCamelContextPropertiesWithPrefix() {
        CamelContext context = new DefaultCamelContext();
        Map<String, String> properties = context.getProperties();
        properties.put("camel.object.helper.test1", "test1");
        properties.put("camel.object.helper.test2", "test2");
        properties.put("camel.object.test", "test");

        Properties result = ObjectHelper.getCamelPropertiesWithPrefix("camel.object.helper.", context);
View Full Code Here

Examples of org.apache.camel.CamelContext

*/
public class ManagedListComponentsTest extends ManagementTestSupport {

    @Override
    protected CamelContext createCamelContext() throws Exception {
        CamelContext context = super.createCamelContext();
        // to force a different management name than the camel id
        context.getManagementNameStrategy().setNamePattern("20-#name#");
        return context;
    }
View Full Code Here

Examples of org.apache.camel.CamelContext

        assertTrue(json.contains("\"synchronous\": { \"type\": \"boolean\""));
    }

    @Test
    public void testComponentDocumentation() throws Exception {
        CamelContext context = new DefaultCamelContext();
        String html = context.getComponentDocumentation("browse");
        assertNotNull("Should have found some auto-generated HTML", html);
    }
View Full Code Here

Examples of org.apache.camel.CamelContext

        assertTrue(json.contains("\"groupInterval\": { \"type\": \"integer\""));
    }

    @Test
    public void testComponentDocumentation() throws Exception {
        CamelContext context = new DefaultCamelContext();
        String html = context.getComponentDocumentation("log");
        assertNotNull("Should have found some auto-generated HTML", html);
    }
View Full Code Here

Examples of org.apache.camel.CamelContext

        assertTrue(json.contains("\"blockWhenFull\": { \"type\": \"boolean\""));
    }

    @Test
    public void testComponentDocumentation() throws Exception {
        CamelContext context = new DefaultCamelContext();
        String html = context.getComponentDocumentation("seda");
        assertNotNull("Should have found some auto-generated HTML", html);
    }
View Full Code Here

Examples of org.apache.camel.CamelContext

        assertTrue(json.contains("\"block\": { \"type\": \"boolean\""));
    }

    @Test
    public void testComponentDocumentation() throws Exception {
        CamelContext context = new DefaultCamelContext();
        String html = context.getComponentDocumentation("direct-vm");
        assertNotNull("Should have found some auto-generated HTML", html);
    }
View Full Code Here

Examples of org.apache.camel.CamelContext

        // need to clear the listener for testing
        ((DefaultCamelContextRegistry) CamelContextRegistry.INSTANCE).clear();

        MyListener listener = new MyListener();

        CamelContext camel1 = new DefaultCamelContext();
        CamelContext camel2 = new DefaultCamelContext();

        assertEquals(0, listener.names.size());

        CamelContextRegistry.INSTANCE.addListener(listener, true);

        // after we set, then we should manage the 2 pending contexts
        assertEquals(2, listener.names.size());

        CamelContext camel3 = new DefaultCamelContext();
        assertEquals(3, listener.names.size());
        assertEquals(camel1.getName(), listener.names.get(0));
        assertEquals(camel2.getName(), listener.names.get(1));
        assertEquals(camel3.getName(), listener.names.get(2));

        camel1.stop();
        camel2.stop();
        camel3.stop();

        assertEquals(0, listener.names.size());
    }
View Full Code Here

Examples of org.apache.camel.CamelContext

        assertTrue(json.contains("\"block\": { \"type\": \"boolean\""));
    }

    @Test
    public void testComponentDocumentation() throws Exception {
        CamelContext context = new DefaultCamelContext();
        String html = context.getComponentDocumentation("direct");
        assertNotNull("Should have found some auto-generated HTML", html);
    }
View Full Code Here

Examples of org.apache.camel.CamelContext

        assertTrue(json.contains("\"async\": { \"type\": \"boolean\""));
    }

    @Test
    public void testComponentDocumentation() throws Exception {
        CamelContext context = new DefaultCamelContext();
        String html = context.getComponentDocumentation("controlbus");
        assertNotNull("Should have found some auto-generated HTML", html);
    }
View Full Code Here

Examples of org.apache.camel.CamelContext

        assertNotNull("Should have found some auto-generated HTML", html);
    }

    @Test
    public void testComponentJsonSchema() throws Exception {
        CamelContext context = new DefaultCamelContext();
        String json = context.getComponentParameterJsonSchema("direct");
        assertNotNull("Should have found some auto-generated JSON", json);
        log.info(json);

        // should include javadoc
        assertTrue("Should include javadoc", json.contains("\"timeout\": { \"type\": \"integer\", \"javaType\": \"long\","
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.