use of org.apache.camel.main.Main in project ddf by codice.
the class CoreProducerConsumerExample method main.
public static void main(String... args) throws Exception {
Main main = new Main();
main.enableHangupSupport();
main.addRouteBuilder(new CoreProducerConsumerExample());
System.setProperty("javax.net.ssl.keyStore", CoreProducerConsumerExample.class.getResource("/serverKeystore.jks").toURI().getPath());
System.setProperty("javax.net.ssl.keyStorePassword", "changeit");
System.setProperty("javax.net.ssl.trustStore", CoreProducerConsumerExample.class.getResource("/serverTruststore.jks").toURI().getPath());
System.setProperty("javax.net.ssl.trustStorePassword", "changeit");
main.run(args);
}
use of org.apache.camel.main.Main in project camel by apache.
the class EtcdRoutePolicyMain method main.
public static void main(final String[] args) throws Exception {
Main main = new Main();
main.addRouteBuilder(new RouteBuilder() {
public void configure() {
EtcdRoutePolicy policy = new EtcdRoutePolicy();
policy.setClientUris(EtcdConstants.ETCD_DEFAULT_URIS);
policy.setServicePath("/camel/services/leader");
policy.setServiceName(args[1]);
policy.setTtl(15);
from("file:///tmp/camel?delete=true").routeId(args[1]).routePolicy(policy).setHeader("EtcdRouteID", constant(args[1])).setHeader("EtcdServiceName", constant(args[0])).to("log:org.apache.camel.component.etcd?level=INFO&showAll=true");
}
});
main.run();
}
use of org.apache.camel.main.Main in project camel by apache.
the class HazelcastRoutePolicyMain method main.
public static void main(final String[] args) throws Exception {
Main main = new Main();
main.addRouteBuilder(new RouteBuilder() {
public void configure() {
HazelcastRoutePolicy policy = new HazelcastRoutePolicy();
policy.setLockMapName("camel:lock:map");
policy.setLockKey("route-policy");
policy.setLockValue(args[1]);
policy.setTryLockTimeout(5, TimeUnit.SECONDS);
from("file:///tmp/camel?delete=true").routeId(args[1]).routePolicy(policy).setHeader("HazelcastRouteID", constant(args[1])).setHeader("HazelcastServiceName", constant(args[0])).to("log:org.apache.camel.component.hazelcast?level=INFO&showAll=true");
}
});
main.run();
}
use of org.apache.camel.main.Main in project camel by apache.
the class UserMain method main.
public static void main(String[] args) throws Exception {
Main main = new Main();
main.bind("userService", new UserService());
main.addRouteBuilder(new UserRouteBuilder());
main.run();
}
use of org.apache.camel.main.Main in project camel by apache.
the class SplunkSavedSearchClient method main.
public static void main(String[] args) throws Exception {
LOG.info("About to run splunk-camel integration...");
Main main = new Main();
main.addRouteBuilder(new SplunkSavedSearchRouteBuilder());
main.run();
}
Aggregations