Package tweetoscope.tweetsProducer
Class TwitterFilteredStreamReaderSingleton
java.lang.Object
tweetoscope.tweetsProducer.TweetsProducer
tweetoscope.tweetsProducer.OnlineTweetsProducer
tweetoscope.tweetsProducer.TwitterFilteredStreamReaderSingleton
- All Implemented Interfaces:
Runnable
,Flow.Publisher<com.twitter.clientlib.model.Tweet>
Connects to the Twitter search stream endpoint and
search for Tweets with given keywords (minimum 1, maximum 5).
As Tweets are received, Tweet subscribers are notified.
Requires the BEARER_TOKEN environment variable to be set
to connect to the Twitter API endpoint.
To ensure only one instance of this class is created at any time, it
implements the Singleton pattern.
- Author:
- Virginie Galtier
-
Field Summary
Modifier and TypeFieldDescriptionKeywords to search for (minimum 1, maximum 5)Fields inherited from class tweetoscope.tweetsProducer.OnlineTweetsProducer
BEARER_TOKEN
Fields inherited from class tweetoscope.tweetsProducer.TweetsProducer
subscribers
-
Method Summary
Methods inherited from class tweetoscope.tweetsProducer.TweetsProducer
subscribe
-
Field Details
-
keywords
Keywords to search for (minimum 1, maximum 5)
-
-
Method Details
-
getInstance
- Returns:
- single instance of the filtered Tweets producer
-
run
public void run()
-