|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.Thread
adams.flow.source.TwitterListener.Listener
public static class TwitterListener.Listener
Thread for listening to Twitter status updates.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.lang.Thread |
|---|
Thread.State, Thread.UncaughtExceptionHandler |
| Field Summary | |
|---|---|
static int |
HTTP_ERROR_INITIAL_WAIT
|
static int |
HTTP_ERROR_WAIT_CAP
|
protected int |
m_Count
the number of status received so far. |
protected boolean |
m_Listening
whether the thread is still listening for updates. |
protected twitter4j.Status |
m_Next
the next status update. |
protected TwitterListener |
m_Owner
the owning actor. |
protected twitter4j.StatusStream |
m_Stream
the status stream. |
protected int |
m_TimeToSleep
the time to sleep for the thread. |
protected twitter4j.TwitterStream |
m_Twitter
for accessing the twitter streaming API. |
protected twitter4j.StatusListener |
m_TwitterListener
for listening to tweets. |
static int |
TCP_ERROR_INITIAL_WAIT
|
static int |
TCP_ERROR_WAIT_CAP
|
| Fields inherited from class java.lang.Thread |
|---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
|---|---|
TwitterListener.Listener(TwitterListener owner)
Initializes the listener thread. |
|
| Method Summary | |
|---|---|
TwitterListener |
getOwner()
Returns the owning actor. |
boolean |
hasNext()
Returns whether there is another update available. |
boolean |
isListening()
Returns whether the thread is still listening. |
twitter4j.Status |
next()
Returns the next status update. |
void |
onDeletionNotice(twitter4j.StatusDeletionNotice arg0)
Ignored. |
void |
onException(Exception e)
Whenever an exception occurs. |
void |
onScrubGeo(int arg0,
long arg1)
Ignored. |
void |
onScrubGeo(long arg0,
long arg1)
Ignored. |
void |
onStallWarning(twitter4j.StallWarning arg0)
Ignored. |
void |
onStatus(twitter4j.Status status)
Reacts to new updates. |
void |
onTrackLimitationNotice(int arg0)
Ignored. |
void |
run()
Starts the listening. |
void |
stopListening()
Stops the listening process. |
| Methods inherited from class java.lang.Thread |
|---|
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int TCP_ERROR_INITIAL_WAIT
public static final int TCP_ERROR_WAIT_CAP
public static final int HTTP_ERROR_INITIAL_WAIT
public static final int HTTP_ERROR_WAIT_CAP
protected TwitterListener m_Owner
protected twitter4j.TwitterStream m_Twitter
protected twitter4j.StatusListener m_TwitterListener
protected boolean m_Listening
protected int m_Count
protected twitter4j.StatusStream m_Stream
protected int m_TimeToSleep
protected twitter4j.Status m_Next
| Constructor Detail |
|---|
public TwitterListener.Listener(TwitterListener owner)
owner - the owning actor| Method Detail |
|---|
public TwitterListener getOwner()
public void run()
run in interface Runnablerun in class Threadpublic boolean isListening()
public void stopListening()
public void onDeletionNotice(twitter4j.StatusDeletionNotice arg0)
onDeletionNotice in interface twitter4j.StatusListenerarg0 - ignoredpublic void onException(Exception e)
e - the execptionpublic void onStatus(twitter4j.Status status)
onStatus in interface twitter4j.StatusListenerstatus - the new updatepublic void onTrackLimitationNotice(int arg0)
onTrackLimitationNotice in interface twitter4j.StatusListenerarg0 - ignored
public void onScrubGeo(int arg0,
long arg1)
arg0 - ignoredarg1 - ignored
public void onScrubGeo(long arg0,
long arg1)
onScrubGeo in interface twitter4j.StatusListenerarg0 - ignoredarg1 - ignoredpublic void onStallWarning(twitter4j.StallWarning arg0)
onStallWarning in interface twitter4j.StatusListenerarg0 - ignoredpublic twitter4j.Status next()
public boolean hasNext()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||