Package org.apache.camel.main

Examples of org.apache.camel.main.Main


    /**
     * A main() so we can easily run these routing rules in our IDE
     */
    public static void main(String... args) throws Exception {
        Main main = new Main();
        main.enableHangupSupport();
        main.addRouteBuilder(new MyRouteBuilder());
        main.run(args);
    }
View Full Code Here


   * @throws Exception
   */
  public void boot(String[] args) throws Exception {
        String methodName = "boot";
        // create a Main instance
        main = new Main();
        // enable hangup support so you can press ctrl + c to terminate the JVM
        main.enableHangupSupport();
        //  Load ducc properties file and enrich System properties. It supports
        //  overrides for entries in ducc properties file. Any key in the ducc
        //  property file can be overriden with -D<key>=<value>
View Full Code Here

        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();

        // enable hangup support which mean we detect when the JVM terminates, and stop Camel graceful
        main.enableHangupSupport();

        TwitterWebSocketRoute route = new TwitterWebSocketRoute();

        // setup twitter application authentication
        route.setAccessToken(accessToken);
        route.setAccessTokenSecret(accessTokenSecret);
        route.setConsumerKey(consumerKey);
        route.setConsumerSecret(consumerSecret);

        // poll for gaga, every 2nd second
        route.setSearchTerm("gaga");
        route.setDelay(2);

        // 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();
    }
View Full Code Here

    /**
     * A main() so we can easily run these routing rules in our IDE
     */
    public static void main(String... args) throws Exception {
        Main main = new Main();
        main.enableHangupSupport();
        main.addRouteBuilder(new MyRouteBuilder());
        main.run(args);
    }
View Full Code Here

    private SplunkSavedSearchClient() {
    }

    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.enableHangupSupport();
        main.run();
    }
View Full Code Here

    private SplunkSearchClient() {
    }

    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.enableHangupSupport();
        main.run();
    }
View Full Code Here

        System.out.println("Open your web browser on http://localhost:8080");
        System.out.println("Press ctrl+c to stop this example");
        System.out.println("===============================================");
        System.out.println("\n\n\n\n");

        Main main = new Main();
        main.enableHangupSupport();
        main.addRouteBuilder(new MyRouteBuilder());
        main.run(args);
    }
View Full Code Here

        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();

        // enable hangup support which mean we detect when the JVM terminates, and stop Camel graceful
        main.enableHangupSupport();

        TwitterWebSocketRoute route = new TwitterWebSocketRoute();

        // setup twitter application authentication
        route.setAccessToken(accessToken);
        route.setAccessTokenSecret(accessTokenSecret);
        route.setConsumerKey(consumerKey);
        route.setConsumerSecret(consumerSecret);

        // poll for gaga, every 2nd second
        route.setSearchTerm("gaga");
        route.setDelay(2);

        // 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();
    }
View Full Code Here

    private MyFtpServer() {
    }

    public static void main(String[] args) throws Exception {
        Main main = new Main();
        main.addRouteBuilder(new MyFtpServerRouteBuilder());
        main.enableHangupSupport();
        main.run();
    }
View Full Code Here

    private MyFtpClient() {
    }

    public static void main(String[] args) throws Exception {
        Main main = new Main();
        main.addRouteBuilder(new MyFtpClientRouteBuilder());
        main.enableHangupSupport();
        main.run();
    }
View Full Code Here

TOP

Related Classes of org.apache.camel.main.Main

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.