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