Class SampleListener
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.flow.source.twitterlistener.AbstractListener
-
- adams.flow.source.twitterlistener.SampleListener
-
- All Implemented Interfaces:
adams.core.Destroyable
,adams.core.GlobalInfoSupporter
,adams.core.logging.LoggingLevelHandler
,adams.core.logging.LoggingSupporter
,adams.core.option.OptionHandler
,adams.core.Pausable
,adams.core.QuickInfoSupporter
,adams.core.SizeOfHandler
,adams.core.Stoppable
,adams.flow.core.FlowContextHandler
,Serializable
,twitter4j.StatusListener
public class SampleListener extends AbstractListener implements twitter4j.StatusListener
Listener for twitter sample stream.- Version:
- $Revision: 13567 $
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class adams.flow.source.twitterlistener.AbstractListener
m_Count, m_FlowContext, m_Listening, m_MaxStatusUpdates, m_Next, m_Paused, m_Twitter
-
-
Constructor Summary
Constructors Constructor Description SampleListener()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
globalInfo()
Returns a string describing the object.void
onDeletionNotice(twitter4j.StatusDeletionNotice statusDeletionNotice)
Ignored.void
onException(Exception e)
Gets called if an exception is encountered.void
onScrubGeo(long l, long l1)
Ignored.void
onStallWarning(twitter4j.StallWarning stallWarning)
Outputs a stall warning.void
onStatus(twitter4j.Status status)
When receiving a status.void
onTrackLimitationNotice(int i)
Ignored.protected void
removeListener()
Removes the listener.void
startExecution()
Starts the listening.-
Methods inherited from class adams.flow.source.twitterlistener.AbstractListener
defineOptions, getFlowContext, getLogger, getMaxStatusUpdates, getQuickInfo, hasNext, initialize, isListening, isPaused, maxStatusUpdatesTipText, next, pauseExecution, resumeExecution, setFlowContext, setMaxStatusUpdates, stopExecution
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, loggingLevelTipText, newOptionManager, reset, setLoggingLevel, toCommandLine, toString
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
-
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfo
in interfaceadams.core.GlobalInfoSupporter
- Specified by:
globalInfo
in classadams.core.option.AbstractOptionHandler
- Returns:
- a description suitable for displaying in the gui
-
startExecution
public void startExecution()
Starts the listening.- Specified by:
startExecution
in classAbstractListener
-
removeListener
protected void removeListener()
Removes the listener.- Specified by:
removeListener
in classAbstractListener
-
onStatus
public void onStatus(twitter4j.Status status)
When receiving a status.- Specified by:
onStatus
in interfacetwitter4j.StatusListener
- Parameters:
status
- the status
-
onDeletionNotice
public void onDeletionNotice(twitter4j.StatusDeletionNotice statusDeletionNotice)
Ignored.- Specified by:
onDeletionNotice
in interfacetwitter4j.StatusListener
- Parameters:
statusDeletionNotice
-
-
onTrackLimitationNotice
public void onTrackLimitationNotice(int i)
Ignored.- Specified by:
onTrackLimitationNotice
in interfacetwitter4j.StatusListener
- Parameters:
i
-
-
onScrubGeo
public void onScrubGeo(long l, long l1)
Ignored.- Specified by:
onScrubGeo
in interfacetwitter4j.StatusListener
- Parameters:
l
-l1
-
-
onStallWarning
public void onStallWarning(twitter4j.StallWarning stallWarning)
Outputs a stall warning.- Specified by:
onStallWarning
in interfacetwitter4j.StatusListener
- Parameters:
stallWarning
- the warning
-
onException
public void onException(Exception e)
Gets called if an exception is encountered.- Parameters:
e
- the exception
-
-