Search in sources :

Example 6 with Main

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);
}
Also used : Main(org.apache.camel.main.Main)

Example 7 with Main

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();
}
Also used : RouteBuilder(org.apache.camel.builder.RouteBuilder) Main(org.apache.camel.main.Main)

Example 8 with Main

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();
}
Also used : RouteBuilder(org.apache.camel.builder.RouteBuilder) Main(org.apache.camel.main.Main)

Example 9 with Main

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();
}
Also used : Main(org.apache.camel.main.Main)

Example 10 with Main

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();
}
Also used : Main(org.apache.camel.main.Main)

Aggregations

Main (org.apache.camel.main.Main)18 RouteBuilder (org.apache.camel.builder.RouteBuilder)3 PGDataSource (com.impossibl.postgres.jdbc.PGDataSource)1 Before (org.junit.Before)1