Class MockTwitterStreamRecorded

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

public final class MockTwitterStreamRecorded extends OfflineTweetsProducer
Mimics the TwitterStreamSampleReaderSingleton class. To be used when the Twitter sampled stream rate limit is exceeded for instance. Replays Tweets recorded previously from the Twitter API.
Author:
Virginie Galtier
  • Field Details

    • fileName

      protected String fileName
      File that holds the recorded Tweets
  • Constructor Details

    • MockTwitterStreamRecorded

      public MockTwitterStreamRecorded(String fileName)
      Creates a MockTwitterStreamRecorded.
  • Method Details

    • run

      public void run()
      Reads Tweets from a file and forwards them to the Java Flow subscribers.