Skip to content

Instantly share code, notes, and snippets.

@brunoborges
Created September 14, 2012 20:09
Show Gist options
  • Select an option

  • Save brunoborges/3724403 to your computer and use it in GitHub Desktop.

Select an option

Save brunoborges/3724403 to your computer and use it in GitHub Desktop.
Configuring a Camel Component with Scala DSL
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)
getContext.addComponent("twitter", tc)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment