Search in sources :

Example 1 with Main

use of org.apache.camel.main.Main in project camel by apache.

the class FooBarWineMain method main.

public static void main(String[] args) throws Exception {
    Main main = new Main();
    main.addRouteBuilder(new FooBarWineRoute());
    main.run();
}
Also used : Main(org.apache.camel.main.Main)

Example 2 with Main

use of org.apache.camel.main.Main in project camel by apache.

the class MyApplication method main.

public static void main(String[] args) throws Exception {
    Main main = new Main();
    main.addMainListener(new MyCamelContextConfigurer());
    main.addRouteBuilder(new MyRouteBuilder());
    main.run(args);
}
Also used : Main(org.apache.camel.main.Main)

Example 3 with Main

use of org.apache.camel.main.Main in project camel by apache.

the class MyFtpServer method main.

public static void main(String[] args) throws Exception {
    Main main = new Main();
    main.addRouteBuilder(new MyFtpServerRouteBuilder());
    main.run();
}
Also used : Main(org.apache.camel.main.Main)

Example 4 with Main

use of org.apache.camel.main.Main in project camel by apache.

the class ConsulRoutePolicyMain method main.

public static void main(final String[] args) throws Exception {
    Main main = new Main();
    main.addRouteBuilder(new RouteBuilder() {

        public void configure() {
            ConsulRoutePolicy policy = new ConsulRoutePolicy();
            policy.setConsulUrl(ConsulConstants.CONSUL_DEFAULT_URL);
            policy.setServiceName(args[0]);
            policy.setTtl(15);
            from("file:///tmp/camel?delete=true").routeId(args[1]).routePolicy(policy).setHeader("ConsulRouteID", simple("${routeId}")).setHeader("ConsulServiceName", constant(args[0])).to("log:org.apache.camel.component.consul?level=INFO&showAll=true");
        }
    });
    main.run();
}
Also used : RouteBuilder(org.apache.camel.builder.RouteBuilder) Main(org.apache.camel.main.Main)

Example 5 with Main

use of org.apache.camel.main.Main in project ddf by codice.

the class OpenwireProducerConsumerExample method main.

public static void main(String... args) throws Exception {
    //normally this would run inside of some container and be converted to a camel blueprint.xml
    // but to simplify testing of a route we can use the dsl camel language and run it from a camel main
    Main main = new Main();
    main.addRouteBuilder(new OpenwireProducerConsumerExample());
    main.run(args);
}
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