org.apache.camel.component.twitter.consumer.streaming
Class StreamingConsumer
java.lang.Object
org.apache.camel.component.twitter.consumer.Twitter4JConsumer
org.apache.camel.component.twitter.consumer.streaming.StreamingConsumer
- All Implemented Interfaces:
- twitter4j.StatusListener
- Direct Known Subclasses:
- FilterConsumer, SampleConsumer
public abstract class StreamingConsumer
- extends Twitter4JConsumer
- implements twitter4j.StatusListener
Super class providing consuming capabilities for the streaming API.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface twitter4j.StatusListener |
onStallWarning |
twitterStream
protected final twitter4j.TwitterStream twitterStream
StreamingConsumer
public StreamingConsumer(TwitterEndpoint te)
pollConsume
public List<twitter4j.Status> pollConsume()
throws twitter4j.TwitterException
- Description copied from class:
Twitter4JConsumer
- Called by polling consumers during each poll. It needs to be separate
from directConsume() since, as an example, streaming API polling allows
tweets to build up between polls.
- Specified by:
pollConsume
in class Twitter4JConsumer
- Throws:
twitter4j.TwitterException
directConsume
public List<twitter4j.Status> directConsume()
throws twitter4j.TwitterException
- Description copied from class:
Twitter4JConsumer
- Called by direct consumers.
- Specified by:
directConsume
in class Twitter4JConsumer
- Throws:
twitter4j.TwitterException
onException
public void onException(Exception ex)
onStatus
public void onStatus(twitter4j.Status status)
- Specified by:
onStatus
in interface twitter4j.StatusListener
onDeletionNotice
public void onDeletionNotice(twitter4j.StatusDeletionNotice statusDeletionNotice)
- Specified by:
onDeletionNotice
in interface twitter4j.StatusListener
onTrackLimitationNotice
public void onTrackLimitationNotice(int numberOfLimitedStatuses)
- Specified by:
onTrackLimitationNotice
in interface twitter4j.StatusListener
onScrubGeo
public void onScrubGeo(long userId,
long upToStatusId)
- Specified by:
onScrubGeo
in interface twitter4j.StatusListener
registerTweetListener
public void registerTweetListener(TweeterStatusListener tweeterStatusListener)
unregisterTweetListener
public void unregisterTweetListener(TweeterStatusListener tweeterStatusListener)
doStart
public void doStart()
doStop
public void doStop()
startStreaming
protected abstract void startStreaming()
Apache Camel