use of org.apache.camel.component.controlbus.ControlBusComponent in project camel by apache.
the class ControlBusComponentAutoConfiguration method configureControlBusComponent.
@Lazy
@Bean(name = "controlbus-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(ControlBusComponent.class)
public ControlBusComponent configureControlBusComponent(CamelContext camelContext) throws Exception {
ControlBusComponent component = new ControlBusComponent();
component.setCamelContext(camelContext);
return component;
}
use of org.apache.camel.component.controlbus.ControlBusComponent in project camel by apache.
the class ControlBusComponentConfigurationAndDocumentationTest method testComponentConfiguration.
@Test
public void testComponentConfiguration() throws Exception {
ControlBusComponent comp = context.getComponent("controlbus", ControlBusComponent.class);
EndpointConfiguration conf = comp.createConfiguration("controlbus:route?routeId=bar&action=stop");
assertEquals("bar", conf.getParameter("routeId"));
assertEquals("stop", conf.getParameter("action"));
ComponentConfiguration compConf = comp.createComponentConfiguration();
String json = compConf.createParameterJsonSchema();
assertNotNull(json);
assertTrue(json.contains("\"action\": { \"kind\": \"parameter\", \"displayName\": \"Action\", \"group\": \"producer\", \"type\": \"string\""));
assertTrue(json.contains("\"async\": { \"kind\": \"parameter\", \"displayName\": \"Async\", \"group\": \"producer\", \"type\": \"boolean\""));
}
Aggregations