use of org.apache.camel.CamelContext in project camel by apache.
the class ComponentConfigurationIntegrationTest method createCamelContext.
@Override
protected CamelContext createCamelContext() throws Exception {
final CamelContext camelContext = super.createCamelContext();
// replace client id with invalid value
camelContext.getComponent("linkedin", LinkedInComponent.class).getConfiguration().setClientId("bad_client_id");
return camelContext;
}
use of org.apache.camel.CamelContext in project camel by apache.
the class BaseMinaTest method createCamelContext.
@Override
protected CamelContext createCamelContext() throws Exception {
CamelContext context = super.createCamelContext();
context.addComponent("properties", new PropertiesComponent("ref:prop"));
return context;
}
use of org.apache.camel.CamelContext in project camel by apache.
the class MetricsMessageHistoryTest method createCamelContext.
@Override
protected CamelContext createCamelContext() throws Exception {
CamelContext context = super.createCamelContext();
MetricsMessageHistoryFactory factory = new MetricsMessageHistoryFactory();
factory.setUseJmx(false);
factory.setMetricsRegistry(registry);
context.setMessageHistoryFactory(factory);
return context;
}
use of org.apache.camel.CamelContext in project camel by apache.
the class ExceptionRouteMetricsMessageHistoryTest method createCamelContext.
@Override
protected CamelContext createCamelContext() throws Exception {
CamelContext context = super.createCamelContext();
MetricsMessageHistoryFactory factory = new MetricsMessageHistoryFactory();
factory.setUseJmx(false);
factory.setMetricsRegistry(registry);
context.setMessageHistoryFactory(factory);
return context;
}
use of org.apache.camel.CamelContext in project opennms by OpenNMS.
the class NCSPathProviderTest method setUp.
@Before
public void setUp() throws Exception {
NCSPathRouteUtil pathUtil = new NCSPathRouteUtil(new MockNCSComponentRepository(), new MockNodeDao());
SimpleRegistry registry = new SimpleRegistry();
registry.put("pathProviderUtil", pathUtil);
CamelContext camel = new DefaultCamelContext(registry);
camel.addRoutes(new RouteBuilder() {
@Override
public void configure() throws Exception {
from("direct:start").setHeader(Exchange.HTTP_URI, simple("http://localhost:10346/ncs-provider/api/space/nsas/service-management/services/884779")).to("http://dummyhost").beanRef("pathProviderUtil", "getServiceName").setHeader(Exchange.HTTP_URI, simple("http://localhost:10346/ncs-provider/api/space/nsas/eline-ptp/service-management/services/884779/servicepath?deviceA=${header.deviceA}&deviceZ=${header.deviceZ}")).to("http://dummyhost").beanRef("pathProviderUtil", "createPath");
}
});
camel.start();
m_ncsPathService = new NCSPathProviderService(camel);
}
Aggregations