camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject svn commit: r1361478 - /camel/trunk/examples/camel-example-twitter-websocket/src/main/java/org/apache/camel/example/websocket/TwitterWebSocketRoute.java
Date Sat, 14 Jul 2012 07:03:19 GMT
Author: davsclaus
Date: Sat Jul 14 07:03:19 2012
New Revision: 1361478

URL: http://svn.apache.org/viewvc?rev=1361478&view=rev
Log:
Reverted rev 1359674 so the example is as before

Modified:
    camel/trunk/examples/camel-example-twitter-websocket/src/main/java/org/apache/camel/example/websocket/TwitterWebSocketRoute.java

Modified: camel/trunk/examples/camel-example-twitter-websocket/src/main/java/org/apache/camel/example/websocket/TwitterWebSocketRoute.java
URL: http://svn.apache.org/viewvc/camel/trunk/examples/camel-example-twitter-websocket/src/main/java/org/apache/camel/example/websocket/TwitterWebSocketRoute.java?rev=1361478&r1=1361477&r2=1361478&view=diff
==============================================================================
--- camel/trunk/examples/camel-example-twitter-websocket/src/main/java/org/apache/camel/example/websocket/TwitterWebSocketRoute.java
(original)
+++ camel/trunk/examples/camel-example-twitter-websocket/src/main/java/org/apache/camel/example/websocket/TwitterWebSocketRoute.java
Sat Jul 14 07:03:19 2012
@@ -18,6 +18,7 @@ package org.apache.camel.example.websock
 
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.websocket.WebsocketComponent;
+import org.apache.camel.component.twitter.TwitterComponent;
 
 /**
  * A Camel route that updates from twitter all tweets using having the search term.
@@ -97,6 +98,13 @@ public class TwitterWebSocketRoute exten
         // we can serve static resources from the classpath: or file: system
         wc.setStaticResources("classpath:.");
 
+        // setup Twitter component
+        TwitterComponent tc = getContext().getComponent("twitter", TwitterComponent.class);
+        tc.setAccessToken(accessToken);
+        tc.setAccessTokenSecret(accessTokenSecret);
+        tc.setConsumerKey(consumerKey);
+        tc.setConsumerSecret(consumerSecret);
+
         // poll twitter search for new tweets
         fromF("twitter://search?type=polling&delay=%s&keywords=%s", delay, searchTerm)
             // and push tweets to all web socket subscribers on camel-tweet



Mime
View raw message