Created
September 14, 2012 20:11
-
-
Save brunoborges/3724420 to your computer and use it in GitHub Desktop.
Fixed Configuring Camel Component with Scala DSL
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class TDCOnCamelRoute extends RouteBuilder { | |
| val accessToken = System.getProperty("twitter.accessToken") | |
| val accessTokenSecret = System.getProperty("twitter.accessTokenSecret") | |
| val consumerKey = System.getProperty("twitter.consumerKey") | |
| val consumerSecret = System.getProperty("twitter.consumerSecret") | |
| val tc = new TwitterComponent() | |
| tc.setAccessToken(accessToken) | |
| tc.setAccessTokenSecret(accessTokenSecret) | |
| tc.setConsumerKey(consumerKey) | |
| tc.setConsumerSecret(consumerSecret) | |
| override def onJavaBuilder(builder: org.apache.camel.builder.RouteBuilder) = { | |
| builder.getContext().addComponent("twitter", tc) | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment