Class TwitterFilteredStreamReaderSingleton

All Implemented Interfaces:
Runnable, Flow.Publisher<com.twitter.clientlib.model.Tweet>

public final class TwitterFilteredStreamReaderSingleton extends OnlineTweetsProducer
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 Details

    • keywords

      protected List<String> keywords
      Keywords to search for (minimum 1, maximum 5)
  • Method Details