abstract class AbstractStreamImplementation
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
(package private) class |
AbstractStreamImplementation.StreamEvent |
Modifier and Type | Field and Description |
---|---|
private java.io.BufferedReader |
br |
protected twitter4j.internal.async.Dispatcher |
dispatcher |
private java.io.InputStream |
is |
protected static twitter4j.internal.logging.Logger |
logger |
private twitter4j.internal.http.HttpResponse |
response |
private boolean |
streamAlive |
Constructor and Description |
---|
AbstractStreamImplementation(twitter4j.internal.async.Dispatcher dispatcher,
twitter4j.internal.http.HttpResponse response) |
AbstractStreamImplementation(twitter4j.internal.async.Dispatcher dispatcher,
java.io.InputStream stream) |
Modifier and Type | Method and Description |
---|---|
protected DirectMessage |
asDirectMessage(twitter4j.internal.org.json.JSONObject json) |
protected int[] |
asFriendList(twitter4j.internal.org.json.JSONObject json) |
protected Status |
asStatus(twitter4j.internal.org.json.JSONObject json) |
protected User |
asUser(twitter4j.internal.org.json.JSONObject json) |
protected UserList |
asUserList(twitter4j.internal.org.json.JSONObject json) |
void |
close() |
protected void |
handleNextElement() |
(package private) abstract void |
next(StreamListener[] listeners) |
protected void |
onBlock(twitter4j.internal.org.json.JSONObject source,
twitter4j.internal.org.json.JSONObject target) |
protected void |
onDelete(twitter4j.internal.org.json.JSONObject json) |
protected void |
onDirectMessage(twitter4j.internal.org.json.JSONObject json) |
protected void |
onException(java.lang.Exception e) |
protected void |
onFavorite(twitter4j.internal.org.json.JSONObject source,
twitter4j.internal.org.json.JSONObject target,
twitter4j.internal.org.json.JSONObject targetObject) |
protected void |
onFollow(twitter4j.internal.org.json.JSONObject source,
twitter4j.internal.org.json.JSONObject target) |
protected void |
onFriends(twitter4j.internal.org.json.JSONObject json) |
protected void |
onLimit(twitter4j.internal.org.json.JSONObject json) |
protected void |
onRetweet(twitter4j.internal.org.json.JSONObject source,
twitter4j.internal.org.json.JSONObject target,
twitter4j.internal.org.json.JSONObject targetObject) |
protected void |
onScrubGeo(twitter4j.internal.org.json.JSONObject json) |
protected void |
onSender(twitter4j.internal.org.json.JSONObject json) |
protected void |
onStatus(twitter4j.internal.org.json.JSONObject json) |
protected void |
onUnblock(twitter4j.internal.org.json.JSONObject source,
twitter4j.internal.org.json.JSONObject target) |
protected void |
onUnfavorite(twitter4j.internal.org.json.JSONObject source,
twitter4j.internal.org.json.JSONObject target,
twitter4j.internal.org.json.JSONObject targetObject) |
protected void |
onUserListCreated(twitter4j.internal.org.json.JSONObject source,
twitter4j.internal.org.json.JSONObject userList) |
protected void |
onUserListDestroyed(twitter4j.internal.org.json.JSONObject source,
twitter4j.internal.org.json.JSONObject userList) |
protected void |
onUserListSubscribed(twitter4j.internal.org.json.JSONObject source,
twitter4j.internal.org.json.JSONObject owner,
twitter4j.internal.org.json.JSONObject userList) |
protected void |
onUserListUpdated(twitter4j.internal.org.json.JSONObject source,
twitter4j.internal.org.json.JSONObject userList) |
protected void |
onUserUpdate(twitter4j.internal.org.json.JSONObject source,
twitter4j.internal.org.json.JSONObject target) |
protected java.lang.String |
parseLine(java.lang.String line) |
protected static final twitter4j.internal.logging.Logger logger
private boolean streamAlive
private java.io.BufferedReader br
private java.io.InputStream is
private twitter4j.internal.http.HttpResponse response
protected final twitter4j.internal.async.Dispatcher dispatcher
AbstractStreamImplementation(twitter4j.internal.async.Dispatcher dispatcher, java.io.InputStream stream) throws java.io.IOException
java.io.IOException
AbstractStreamImplementation(twitter4j.internal.async.Dispatcher dispatcher, twitter4j.internal.http.HttpResponse response) throws java.io.IOException
java.io.IOException
protected java.lang.String parseLine(java.lang.String line)
abstract void next(StreamListener[] listeners) throws TwitterException
TwitterException
protected void handleNextElement() throws TwitterException
TwitterException
protected void onSender(twitter4j.internal.org.json.JSONObject json) throws TwitterException
TwitterException
protected void onStatus(twitter4j.internal.org.json.JSONObject json) throws TwitterException
TwitterException
protected void onDirectMessage(twitter4j.internal.org.json.JSONObject json) throws TwitterException, twitter4j.internal.org.json.JSONException
TwitterException
twitter4j.internal.org.json.JSONException
protected void onDelete(twitter4j.internal.org.json.JSONObject json) throws TwitterException, twitter4j.internal.org.json.JSONException
TwitterException
twitter4j.internal.org.json.JSONException
protected void onLimit(twitter4j.internal.org.json.JSONObject json) throws TwitterException, twitter4j.internal.org.json.JSONException
TwitterException
twitter4j.internal.org.json.JSONException
protected void onScrubGeo(twitter4j.internal.org.json.JSONObject json) throws TwitterException, twitter4j.internal.org.json.JSONException
TwitterException
twitter4j.internal.org.json.JSONException
protected void onFriends(twitter4j.internal.org.json.JSONObject json) throws TwitterException, twitter4j.internal.org.json.JSONException
TwitterException
twitter4j.internal.org.json.JSONException
protected void onFavorite(twitter4j.internal.org.json.JSONObject source, twitter4j.internal.org.json.JSONObject target, twitter4j.internal.org.json.JSONObject targetObject) throws TwitterException
TwitterException
protected void onUnfavorite(twitter4j.internal.org.json.JSONObject source, twitter4j.internal.org.json.JSONObject target, twitter4j.internal.org.json.JSONObject targetObject) throws TwitterException
TwitterException
protected void onRetweet(twitter4j.internal.org.json.JSONObject source, twitter4j.internal.org.json.JSONObject target, twitter4j.internal.org.json.JSONObject targetObject) throws TwitterException
TwitterException
protected void onFollow(twitter4j.internal.org.json.JSONObject source, twitter4j.internal.org.json.JSONObject target) throws TwitterException
TwitterException
protected void onUserListSubscribed(twitter4j.internal.org.json.JSONObject source, twitter4j.internal.org.json.JSONObject owner, twitter4j.internal.org.json.JSONObject userList) throws TwitterException, twitter4j.internal.org.json.JSONException
TwitterException
twitter4j.internal.org.json.JSONException
protected void onUserListCreated(twitter4j.internal.org.json.JSONObject source, twitter4j.internal.org.json.JSONObject userList) throws TwitterException, twitter4j.internal.org.json.JSONException
TwitterException
twitter4j.internal.org.json.JSONException
protected void onUserListUpdated(twitter4j.internal.org.json.JSONObject source, twitter4j.internal.org.json.JSONObject userList) throws TwitterException, twitter4j.internal.org.json.JSONException
TwitterException
twitter4j.internal.org.json.JSONException
protected void onUserListDestroyed(twitter4j.internal.org.json.JSONObject source, twitter4j.internal.org.json.JSONObject userList) throws TwitterException
TwitterException
protected void onUserUpdate(twitter4j.internal.org.json.JSONObject source, twitter4j.internal.org.json.JSONObject target) throws TwitterException
TwitterException
protected void onBlock(twitter4j.internal.org.json.JSONObject source, twitter4j.internal.org.json.JSONObject target) throws TwitterException
TwitterException
protected void onUnblock(twitter4j.internal.org.json.JSONObject source, twitter4j.internal.org.json.JSONObject target) throws TwitterException
TwitterException
protected void onException(java.lang.Exception e)
public void close() throws java.io.IOException
java.io.IOException
protected Status asStatus(twitter4j.internal.org.json.JSONObject json) throws TwitterException
TwitterException
protected DirectMessage asDirectMessage(twitter4j.internal.org.json.JSONObject json) throws TwitterException
TwitterException
protected int[] asFriendList(twitter4j.internal.org.json.JSONObject json) throws TwitterException
TwitterException
protected User asUser(twitter4j.internal.org.json.JSONObject json) throws TwitterException
TwitterException
protected UserList asUserList(twitter4j.internal.org.json.JSONObject json) throws TwitterException
TwitterException