public class TwitterFollowingProvider extends TwitterUserInformationProvider
Modifier and Type | Field and Description |
---|---|
static int |
MAX_NUMBER_WAITING |
static String |
STREAMS_ID |
end, executor, idsBatches, providerQueue, running, screenNameBatches, start
Constructor and Description |
---|
TwitterFollowingProvider() |
TwitterFollowingProvider(TwitterFollowingConfiguration config) |
Modifier and Type | Method and Description |
---|---|
TwitterFollowingConfiguration |
getConfig() |
boolean |
isRunning() |
static void |
main(String[] args)
To use from command line:
Supply (at least) the following required configuration in application.conf:
twitter.oauth.consumerKey
twitter.oauth.consumerSecret
twitter.oauth.accessToken
twitter.oauth.accessTokenSecret
twitter.info
Launch using:
mvn exec:java -Dexec.mainClass=org.apache.streams.twitter.provider.TwitterFollowingProvider -Dexec.args="application.conf tweets.json"
|
void |
prepare(Object configurationObject) |
StreamsResultSet |
readCurrent() |
boolean |
shouldContinuePulling(List<twitter4j.User> users) |
void |
startStream() |
protected void |
submitFollowingThreads(Long[] ids) |
protected void |
submitFollowingThreads(String[] screenNames) |
callback, cleanUp, constructQueue, getId, getProviderQueue, getTwitterClient, loadBatch, loadBatch, newFixedThreadPoolWithQueueSize, readNew, readRange, setConfig
public static final String STREAMS_ID
public static final int MAX_NUMBER_WAITING
public TwitterFollowingProvider()
public TwitterFollowingProvider(TwitterFollowingConfiguration config)
public static void main(String[] args) throws Exception
args
- argsException
- Exceptionpublic TwitterFollowingConfiguration getConfig()
getConfig
in class TwitterUserInformationProvider
public void prepare(Object configurationObject)
prepare
in interface StreamsOperation
prepare
in class TwitterUserInformationProvider
public void startStream()
startStream
in interface StreamsProvider
startStream
in class TwitterUserInformationProvider
protected void submitFollowingThreads(Long[] ids)
protected void submitFollowingThreads(String[] screenNames)
public StreamsResultSet readCurrent()
readCurrent
in interface StreamsProvider
readCurrent
in class TwitterUserInformationProvider
public boolean shouldContinuePulling(List<twitter4j.User> users)
public boolean isRunning()
isRunning
in interface StreamsProvider
isRunning
in class TwitterUserInformationProvider
Copyright © 2017 The Apache Software Foundation. All rights reserved.