Search in sources :

Example 96 with CamelContext

use of org.apache.camel.CamelContext in project camel by apache.

the class BlueprintMultipleServiceTest method createCamelContext.

@Override
protected CamelContext createCamelContext() throws Exception {
    CamelContext context = super.createCamelContext();
    context.addComponent("fakeservice1", mockComponentOne);
    context.addComponent("fakeservice2", mockComponentTwo);
    return context;
}
Also used : CamelContext(org.apache.camel.CamelContext)

Example 97 with CamelContext

use of org.apache.camel.CamelContext in project camel by apache.

the class AbstractFeatureTest method testLanguage.

protected void testLanguage(String mainFeature, String language) throws Exception {
    LOG.info("Looking up CamelContext(myCamel) in OSGi Service Registry");
    installCamelFeature(mainFeature);
    CamelContext camelContext = getOsgiService(bundleContext, CamelContext.class, "(camel.context.name=myCamel)", 20000);
    assertNotNull("Cannot find CamelContext with name myCamel", camelContext);
    LOG.info("Getting Camel language: {}", language);
    Language lan = camelContext.resolveLanguage(language);
    assertNotNull("Cannot get language with name: " + language, lan);
    LOG.info("Found Camel language: {} instance: {} with className: {}", language, lan, lan.getClass());
}
Also used : CamelContext(org.apache.camel.CamelContext) Language(org.apache.camel.spi.Language)

Example 98 with CamelContext

use of org.apache.camel.CamelContext in project camel by apache.

the class ZipkinSimpleFallbackRouteTest method createCamelContext.

@Override
protected CamelContext createCamelContext() throws Exception {
    CamelContext context = super.createCamelContext();
    zipkin = new ZipkinTracer();
    zipkin.setSpanCollector(new ZipkinLoggingSpanCollector());
    // attaching ourself to CamelContext
    zipkin.init(context);
    return context;
}
Also used : CamelContext(org.apache.camel.CamelContext)

Example 99 with CamelContext

use of org.apache.camel.CamelContext in project camel by apache.

the class ZipkinSimpleLogStreamsRouteTest method createCamelContext.

@Override
protected CamelContext createCamelContext() throws Exception {
    CamelContext context = super.createCamelContext();
    zipkin = new ZipkinTracer();
    zipkin.setServiceName("dude");
    zipkin.setIncludeMessageBodyStreams(true);
    zipkin.setSpanCollector(new ZipkinLoggingSpanCollector());
    // attaching ourself to CamelContext
    zipkin.init(context);
    return context;
}
Also used : CamelContext(org.apache.camel.CamelContext)

Example 100 with CamelContext

use of org.apache.camel.CamelContext in project camel by apache.

the class ZipkinSimpleRouteTest method createCamelContext.

@Override
protected CamelContext createCamelContext() throws Exception {
    CamelContext context = super.createCamelContext();
    zipkin = new ZipkinTracer();
    zipkin.setServiceName("dude");
    zipkin.setSpanCollector(new ZipkinLoggingSpanCollector());
    // attaching ourself to CamelContext
    zipkin.init(context);
    return context;
}
Also used : CamelContext(org.apache.camel.CamelContext)

Aggregations

CamelContext (org.apache.camel.CamelContext)1478 Test (org.junit.Test)691 DefaultCamelContext (org.apache.camel.impl.DefaultCamelContext)684 RouteBuilder (org.apache.camel.builder.RouteBuilder)448 ProducerTemplate (org.apache.camel.ProducerTemplate)434 ConnectionFactory (javax.jms.ConnectionFactory)220 MockEndpoint (org.apache.camel.component.mock.MockEndpoint)210 Exchange (org.apache.camel.Exchange)109 HashMap (java.util.HashMap)93 Endpoint (org.apache.camel.Endpoint)52 DefaultExchange (org.apache.camel.impl.DefaultExchange)50 IOException (java.io.IOException)46 Map (java.util.Map)45 SimpleRegistry (org.apache.camel.impl.SimpleRegistry)44 CountDownLatch (java.util.concurrent.CountDownLatch)42 SpringCamelContext (org.apache.camel.spring.SpringCamelContext)42 ArrayList (java.util.ArrayList)41 Processor (org.apache.camel.Processor)40 PropertiesComponent (org.apache.camel.component.properties.PropertiesComponent)37 CamelExecutionException (org.apache.camel.CamelExecutionException)33