Search in sources :

Example 11 with Main

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

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

Example 12 with Main

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

the class MyFtpClient method main.

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

Example 13 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.addRouteBuilder(new MyRouteBuilder());
    main.run(args);
}
Also used : Main(org.apache.camel.main.Main)

Example 14 with Main

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

the class CamelTwitterWebSocketMain method main.

public static void main(String[] args) throws Exception {
    System.out.println("\n\n\n\n");
    System.out.println("===============================================");
    System.out.println("Open your web browser on http://localhost:9090/index.html");
    System.out.println("Press ctrl+c to stop this example");
    System.out.println("===============================================");
    System.out.println("\n\n\n\n");
    // create a new Camel Main so we can easily start Camel
    Main main = new Main();
    TwitterWebSocketRoute route = new TwitterWebSocketRoute();
    // setup twitter application authentication
    route.setAccessToken(accessToken);
    route.setAccessTokenSecret(accessTokenSecret);
    route.setConsumerKey(consumerKey);
    route.setConsumerSecret(consumerSecret);
    // poll for gaga, every 5nd second
    // twitter rate limits 180 per 15 min, so that is 0.2/sec, eg 1/5sec.
    // so to be safe we do 6 seconds
    route.setSearchTerm("gaga");
    route.setDelay(6000);
    // web socket on port 9090
    route.setPort(9090);
    // add our routes to Camel
    main.addRouteBuilder(route);
    // and run, which keeps blocking until we terminate the JVM (or stop CamelContext)
    main.run();
}
Also used : Main(org.apache.camel.main.Main)

Example 15 with Main

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

the class Service2Application method main.

public static void main(String[] args) throws Exception {
    Main main = new Main();
    main.addRouteBuilder(new Service2Route());
    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