public class TwitterStreamFilterDataset extends AbstractTwitterStatusesFilterDataset<twitter4j.Status>
AbstractTwitterStreamDataset which pushes
the Statuss into the stream.| Constructor and Description |
|---|
TwitterStreamFilterDataset(twitter4j.FilterQuery query,
TwitterAPIToken token)
Construct the dataset from the given API token.
|
TwitterStreamFilterDataset(twitter4j.FilterQuery query,
TwitterAPIToken token,
BlockingDroppingQueue<twitter4j.Status> buffer)
Construct the dataset from the given API token and buffer.
|
TwitterStreamFilterDataset(String[] words,
TwitterAPIToken token)
Construct the dataset from the given API token.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
registerStatus(twitter4j.Status status,
String json)
Handle the given incoming status and optionally
BlockingDroppingBufferedStream.register(Object)
it with the stream. |
getRandomInstance, numInstancesclose, getBuffer, hasNext, next, registerfilter, forEach, forEach, forEach, iterator, map, map, parallelForEach, parallelForEach, remove, transformclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitfilter, forEach, forEach, forEach, map, map, parallelForEach, parallelForEach, transformforEachRemaining, hasNext, next, removeforEach, iterator, spliteratorpublic TwitterStreamFilterDataset(twitter4j.FilterQuery query, TwitterAPIToken token)
ArrayBlockingDroppingQueue with a single item capacity.query - the querytoken - the Twitter api authentication credentialspublic TwitterStreamFilterDataset(String[] words, TwitterAPIToken token)
ArrayBlockingDroppingQueue with a single item capacity.words - the query termstoken - the Twitter api authentication credentialspublic TwitterStreamFilterDataset(twitter4j.FilterQuery query, TwitterAPIToken token, BlockingDroppingQueue<twitter4j.Status> buffer)
query - the querytoken - the Twitter api authentication credentialsbuffer - the buffer to hold Statuss before they are consumed.protected void registerStatus(twitter4j.Status status, String json) throws InterruptedException
AbstractTwitterStatusesFilterDatasetBlockingDroppingBufferedStream.register(Object)
it with the stream.registerStatus in class AbstractTwitterStatusesFilterDataset<twitter4j.Status>status - the parsed Statusjson - the json stringInterruptedException