|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecttwitter4j.examples.StreamingExample
public class StreamingExample
This is a code example of Twitter4J Streaming API support.
Usage: java twitter4j.examples.StreamingExample TwitterID TwitterPassword
Field Summary | |
---|---|
(package private) TwitterStream |
twitterStream
|
Constructor Summary | |
---|---|
StreamingExample(java.lang.String id,
java.lang.String password)
|
Method Summary | |
---|---|
static void |
main(java.lang.String[] args)
Main entry for this application. |
void |
onDeletionNotice(StatusDeletionNotice statusDeletionNotice)
Called upon deletionNotice notices. |
void |
onException(java.lang.Exception ex)
|
void |
onStatus(Status status)
|
void |
onTrackLimitationNotice(int numberOfLimitedStatuses)
This notice will be sent each time a limited stream becomes unlimited. If this number is high and or rapidly increasing, it is an indication that your predicate is too broad, and you should consider a predicate with higher selectivity. |
private void |
startConsuming()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
TwitterStream twitterStream
Constructor Detail |
---|
StreamingExample(java.lang.String id, java.lang.String password)
Method Detail |
---|
public static void main(java.lang.String[] args) throws TwitterException
args
- String[] TwitterID TwitterPassword
TwitterException
private void startConsuming() throws TwitterException
TwitterException
public void onStatus(Status status)
onStatus
in interface StatusListener
public void onDeletionNotice(StatusDeletionNotice statusDeletionNotice)
StatusListener
onDeletionNotice
in interface StatusListener
statusDeletionNotice
- the deletionNotice noticepublic void onTrackLimitationNotice(int numberOfLimitedStatuses)
StatusListener
onTrackLimitationNotice
in interface StatusListener
numberOfLimitedStatuses
- an enumeration of statuses that matched the track predicate but were administratively limited.public void onException(java.lang.Exception ex)
onException
in interface StatusListener
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |