use of org.apache.camel.component.properties.PropertiesComponent in project camel by apache.
the class BaseNettyTest 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.component.properties.PropertiesComponent in project camel by apache.
the class BaseJettyTest 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.component.properties.PropertiesComponent in project camel by apache.
the class GroovyPropertiesFunctionTest method createRouteBuilder.
protected RouteBuilder createRouteBuilder() throws Exception {
return new RouteBuilder() {
public void configure() throws Exception {
PropertiesComponent pc = context.getComponent("properties", PropertiesComponent.class);
pc.setLocation("org/apache/camel/builder/script/myproperties.properties");
from("direct:start").setHeader("myHeader").groovy("properties.resolve(request.headers.get('foo'))").to("mock:result");
}
};
}
use of org.apache.camel.component.properties.PropertiesComponent in project camel by apache.
the class GroovySetHeaderPropertyComponentTest method createRouteBuilder.
protected RouteBuilder createRouteBuilder() throws Exception {
return new RouteBuilder() {
public void configure() throws Exception {
PropertiesComponent pc = context.getComponent("properties", PropertiesComponent.class);
pc.setLocation("org/apache/camel/builder/script/myproperties.properties");
from("direct:start").setHeader("myHeader").groovy("context.resolvePropertyPlaceholders('{{' + request.headers.get('foo') + '}}')").to("mock:result");
from("direct:number").transform().groovy("{{myscript}}").to("mock:result");
}
};
}
use of org.apache.camel.component.properties.PropertiesComponent in project camel by apache.
the class PubsubTestSupport method addPubsubComponent.
protected void addPubsubComponent(CamelContext context) {
GooglePubsubConnectionFactory cf = new GooglePubsubConnectionFactory().setServiceAccount(SERVICE_ACCOUNT).setServiceAccountKey(SERVICE_KEY).setServiceURL(SERVICE_URL);
GooglePubsubComponent component = new GooglePubsubComponent();
component.setConnectionFactory(cf);
context.addComponent("google-pubsub", component);
context.addComponent("properties", new PropertiesComponent("ref:prop"));
}
Aggregations