Examples of TwitterComponent


Examples of org.apache.camel.component.twitter.TwitterComponent

public class VotingStarter {

   
    public void run() throws Exception {
        CamelContext context = new DefaultCamelContext();
        TwitterComponent twitterComponent = context.getComponent("twitter", TwitterComponent.class);
        twitterComponent.setConsumerKey("");
        twitterComponent.setConsumerSecret("");
        twitterComponent.setAccessToken("");
        twitterComponent.setAccessTokenSecret("");
        context.setTracing(true);
        context.addRoutes(new VotingRoutes());
        context.start();
        System.in.read();
        context.stop();
View Full Code Here

Examples of org.apache.camel.component.twitter.TwitterComponent

        wc.setPort(port);
        // 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
            .to("websocket:camel-tweet?sendToAll=true");
View Full Code Here

Examples of org.apache.camel.component.twitter.TwitterComponent

        wc.setPort(port);
        // 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)
            .to("log:tweet")
            // and push tweets to all web socket subscribers on camel-tweet
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.