|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecttwitter4j.TwitterStream
public class TwitterStream
A java reporesentation of the Twitter Streaming API
Note that this class is NOT compatible with Google App Engine as GAE is not capable of handling requests longer than 30 seconds.
| Field Summary | |
|---|---|
protected twitter4j.http.Authorization |
auth
|
protected twitter4j.conf.Configuration |
conf
|
| Constructor Summary | |
|---|---|
TwitterStream()
Deprecated. use new TwitterStreamFactory.getInstance() instead. |
|
TwitterStream(java.lang.String screenName,
java.lang.String password)
Deprecated. use new TwitterStreamFactory.getInstance() instead. |
|
TwitterStream(java.lang.String screenName,
java.lang.String password,
StatusListener listener)
Deprecated. use new TwitterStreamFactory.getInstance() instead. |
|
| Method Summary | |
|---|---|
void |
cleanup()
|
protected void |
ensureAuthorizationEnabled()
|
protected void |
ensureBasicEnabled()
|
protected void |
ensureBasicNotEnabled()
|
boolean |
equals(java.lang.Object o)
|
void |
filter(int count,
int[] follow,
java.lang.String[] track)
See birddog above. |
void |
firehose(int count)
Starts listening on all public statuses. |
twitter4j.http.Authorization |
getAuthorization()
Returns the authorization scheme for this instance. The returned type will be either of BasicAuthorization, OAuthAuthorization, or NullAuthorization |
StatusStream |
getFilterStream(int count,
int[] follow,
java.lang.String[] track)
Returns stream of public statuses that match one or more filter predicates. |
StatusStream |
getFirehoseStream(int count)
Returns a status stream of all public statuses. |
StatusStream |
getRetweetStream()
Returns a stream of all retweets. |
StatusStream |
getSampleStream()
Returns a stream of random sample of all public statuses. |
int |
hashCode()
|
boolean |
isBasicAuthEnabled()
tests if the instance is authenticated by Basic |
void |
retweet()
Starts listening on all retweets. |
void |
sample()
Starts listening on random sample of all public statuses. |
void |
setStatusListener(StatusListener statusListener)
|
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected final twitter4j.conf.Configuration conf
protected twitter4j.http.Authorization auth
| Constructor Detail |
|---|
public TwitterStream()
public TwitterStream(java.lang.String screenName,
java.lang.String password)
screenName - screen namepassword - password
public TwitterStream(java.lang.String screenName,
java.lang.String password,
StatusListener listener)
screenName - screen namepassword - passwordlistener - listener| Method Detail |
|---|
public void firehose(int count)
throws TwitterException
count - Indicates the number of previous statuses to stream before transitioning to the live stream.
TwitterException - when Twitter service or network is unavailableStatusStream,
Twitter API Wiki / Streaming API Documentation - firehose
public StatusStream getFirehoseStream(int count)
throws TwitterException
count - Indicates the number of previous statuses to stream before transitioning to the live stream.
TwitterException - when Twitter service or network is unavailableStatusStream,
Twitter API Wiki / Streaming API Documentation - firehose
public void retweet()
throws TwitterException
TwitterException - when Twitter service or network is unavailableStatusStream,
Twitter API Wiki / Streaming API Documentation - retweet
public StatusStream getRetweetStream()
throws TwitterException
TwitterException - when Twitter service or network is unavailableStatusStream,
Twitter API Wiki / Streaming API Documentation - firehose
public void sample()
throws TwitterException
TwitterException - when Twitter service or network is unavailableStatusStream,
Twitter API Wiki / Streaming API Documentation - sample
public StatusStream getSampleStream()
throws TwitterException
TwitterException - when Twitter service or network is unavailableStatusStream,
Twitter API Wiki / Streaming API Documentation - Sampling
public void filter(int count,
int[] follow,
java.lang.String[] track)
throws TwitterException
count - Indicates the number of previous statuses to stream before transitioning to the live stream.follow - Specifies the users, by ID, to receive public tweets from.track - Specifies keywords to track.
TwitterException - when Twitter service or network is unavailableStatusStream,
Twitter API Wiki / Streaming API Documentation - filter
public StatusStream getFilterStream(int count,
int[] follow,
java.lang.String[] track)
throws TwitterException
follow - Specifies the users, by ID, to receive public tweets from.
TwitterException - when Twitter service or network is unavailableStatusStream,
Twitter API Wiki / Streaming API Documentation - filterpublic void cleanup()
public void setStatusListener(StatusListener statusListener)
public boolean isBasicAuthEnabled()
protected void ensureAuthorizationEnabled()
protected void ensureBasicEnabled()
protected void ensureBasicNotEnabled()
public twitter4j.http.Authorization getAuthorization()
public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||