uk.ac.cam.juliet.twitter.main
Class TwitterStreamingAPI.StreamHandler

java.lang.Object
  extended by uk.ac.cam.juliet.twitter.main.TwitterStreamingAPI.StreamHandler
All Implemented Interfaces:
com.crepezzi.tweetstream4j.TwitterStreamHandler
Enclosing class:
TwitterStreamingAPI

private class TwitterStreamingAPI.StreamHandler
extends java.lang.Object
implements com.crepezzi.tweetstream4j.TwitterStreamHandler

the class that handles every tweet returned from the twitter Search API, not storing or analysing, but simply adding it to a queue

Author:
Ahmad Akra

Field Summary
(package private)  java.text.DateFormat format
          DateFormat used to parse strings into Date objects
 
Constructor Summary
private TwitterStreamingAPI.StreamHandler()
           
 
Method Summary
 void addDeletion(com.crepezzi.tweetstream4j.types.SDeletion d)
          What to do when we get a new limit from the stream
 void addLimit(com.crepezzi.tweetstream4j.types.SLimit l)
          What to do when we get a new deletion request from the stream
 void addTweet(com.crepezzi.tweetstream4j.types.STweet t)
          What to do when we get a new tweet from the stream
 void stop()
          Twitter stream handler has been requested to stop.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

format

java.text.DateFormat format
DateFormat used to parse strings into Date objects

Constructor Detail

TwitterStreamingAPI.StreamHandler

private TwitterStreamingAPI.StreamHandler()
Method Detail

addTweet

public void addTweet(com.crepezzi.tweetstream4j.types.STweet t)
Description copied from interface: com.crepezzi.tweetstream4j.TwitterStreamHandler
What to do when we get a new tweet from the stream

Specified by:
addTweet in interface com.crepezzi.tweetstream4j.TwitterStreamHandler
Parameters:
t - Incoming tweet

addLimit

public void addLimit(com.crepezzi.tweetstream4j.types.SLimit l)
Description copied from interface: com.crepezzi.tweetstream4j.TwitterStreamHandler
What to do when we get a new deletion request from the stream

Specified by:
addLimit in interface com.crepezzi.tweetstream4j.TwitterStreamHandler
Parameters:
l - Incoming deletion request

addDeletion

public void addDeletion(com.crepezzi.tweetstream4j.types.SDeletion d)
Description copied from interface: com.crepezzi.tweetstream4j.TwitterStreamHandler
What to do when we get a new limit from the stream

Specified by:
addDeletion in interface com.crepezzi.tweetstream4j.TwitterStreamHandler
Parameters:
d - Incoming limit

stop

public void stop()
Description copied from interface: com.crepezzi.tweetstream4j.TwitterStreamHandler
Twitter stream handler has been requested to stop.

Specified by:
stop in interface com.crepezzi.tweetstream4j.TwitterStreamHandler