abstract class StatusStreamBase extends java.lang.Object implements StatusStream
| Modifier and Type | Class and Description |
|---|---|
(package private) class |
StatusStreamBase.StreamEvent |
| Modifier and Type | Field and Description |
|---|---|
private java.io.BufferedReader |
br |
protected Configuration |
CONF |
protected twitter4j.internal.async.Dispatcher |
dispatcher |
protected twitter4j.internal.json.z_T4JInternalFactory |
factory |
private java.io.InputStream |
is |
protected static twitter4j.internal.logging.Logger |
logger |
private twitter4j.internal.http.HttpResponse |
response |
private boolean |
streamAlive |
| Constructor and Description |
|---|
StatusStreamBase(twitter4j.internal.async.Dispatcher dispatcher,
twitter4j.internal.http.HttpResponse response,
Configuration conf) |
StatusStreamBase(twitter4j.internal.async.Dispatcher dispatcher,
java.io.InputStream stream,
Configuration conf) |
| Modifier and Type | Method and Description |
|---|---|
protected DirectMessage |
asDirectMessage(twitter4j.internal.org.json.JSONObject json) |
protected long[] |
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(StreamListener[] listeners,
RawStreamListener[] rawStreamListeners) |
abstract void |
next(StatusListener listener)
Reads next status from this stream.
|
abstract void |
next(StreamListener[] listeners,
RawStreamListener[] rawStreamListeners) |
protected void |
onBlock(twitter4j.internal.org.json.JSONObject source,
twitter4j.internal.org.json.JSONObject target,
StreamListener[] listeners) |
protected void |
onDelete(twitter4j.internal.org.json.JSONObject json,
StreamListener[] listeners) |
protected void |
onDirectMessage(twitter4j.internal.org.json.JSONObject json,
StreamListener[] listeners) |
protected void |
onDisconnectionNotice(java.lang.String line,
StreamListener[] listeners) |
protected void |
onException(java.lang.Exception e,
StreamListener[] listeners) |
void |
onException(java.lang.Exception e,
StreamListener[] listeners,
RawStreamListener[] rawStreamListeners) |
protected void |
onFavorite(twitter4j.internal.org.json.JSONObject source,
twitter4j.internal.org.json.JSONObject target,
twitter4j.internal.org.json.JSONObject targetObject,
StreamListener[] listeners) |
protected void |
onFollow(twitter4j.internal.org.json.JSONObject source,
twitter4j.internal.org.json.JSONObject target,
StreamListener[] listeners) |
protected void |
onFriends(twitter4j.internal.org.json.JSONObject json,
StreamListener[] listeners) |
protected void |
onLimit(twitter4j.internal.org.json.JSONObject json,
StreamListener[] listeners) |
protected void |
onMessage(java.lang.String rawString,
RawStreamListener[] listeners) |
protected void |
onScrubGeo(twitter4j.internal.org.json.JSONObject json,
StreamListener[] listeners) |
protected void |
onSender(twitter4j.internal.org.json.JSONObject json,
StreamListener[] listeners) |
protected void |
onStallWarning(twitter4j.internal.org.json.JSONObject json,
StreamListener[] listeners) |
protected void |
onStatus(twitter4j.internal.org.json.JSONObject json,
StreamListener[] listeners) |
protected void |
onUnblock(twitter4j.internal.org.json.JSONObject source,
twitter4j.internal.org.json.JSONObject target,
StreamListener[] listeners) |
protected void |
onUnfavorite(twitter4j.internal.org.json.JSONObject source,
twitter4j.internal.org.json.JSONObject target,
twitter4j.internal.org.json.JSONObject targetObject,
StreamListener[] listeners) |
protected void |
onUnfollow(twitter4j.internal.org.json.JSONObject source,
twitter4j.internal.org.json.JSONObject target,
StreamListener[] listeners) |
protected void |
onUserListCreation(twitter4j.internal.org.json.JSONObject source,
twitter4j.internal.org.json.JSONObject userList,
StreamListener[] listeners) |
protected void |
onUserListDestroyed(twitter4j.internal.org.json.JSONObject source,
twitter4j.internal.org.json.JSONObject userList,
StreamListener[] listeners) |
protected void |
onUserListMemberAddition(twitter4j.internal.org.json.JSONObject addedMember,
twitter4j.internal.org.json.JSONObject owner,
twitter4j.internal.org.json.JSONObject userList,
StreamListener[] listeners) |
protected void |
onUserListMemberDeletion(twitter4j.internal.org.json.JSONObject deletedMember,
twitter4j.internal.org.json.JSONObject owner,
twitter4j.internal.org.json.JSONObject userList,
StreamListener[] listeners) |
protected void |
onUserListSubscription(twitter4j.internal.org.json.JSONObject source,
twitter4j.internal.org.json.JSONObject owner,
twitter4j.internal.org.json.JSONObject userList,
StreamListener[] listeners) |
protected void |
onUserListUnsubscription(twitter4j.internal.org.json.JSONObject source,
twitter4j.internal.org.json.JSONObject owner,
twitter4j.internal.org.json.JSONObject userList,
StreamListener[] listeners) |
protected void |
onUserListUpdated(twitter4j.internal.org.json.JSONObject source,
twitter4j.internal.org.json.JSONObject userList,
StreamListener[] listeners) |
protected void |
onUserUpdate(twitter4j.internal.org.json.JSONObject source,
twitter4j.internal.org.json.JSONObject target,
StreamListener[] listeners) |
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
protected final Configuration CONF
protected twitter4j.internal.json.z_T4JInternalFactory factory
StatusStreamBase(twitter4j.internal.async.Dispatcher dispatcher,
java.io.InputStream stream,
Configuration conf)
throws java.io.IOException
java.io.IOExceptionStatusStreamBase(twitter4j.internal.async.Dispatcher dispatcher,
twitter4j.internal.http.HttpResponse response,
Configuration conf)
throws java.io.IOException
java.io.IOExceptionprotected java.lang.String parseLine(java.lang.String line)
protected void handleNextElement(StreamListener[] listeners, RawStreamListener[] rawStreamListeners) throws TwitterException
TwitterExceptionprotected void onMessage(java.lang.String rawString,
RawStreamListener[] listeners)
throws TwitterException
TwitterExceptionprotected void onSender(twitter4j.internal.org.json.JSONObject json,
StreamListener[] listeners)
throws TwitterException
TwitterExceptionprotected void onStatus(twitter4j.internal.org.json.JSONObject json,
StreamListener[] listeners)
throws TwitterException
TwitterExceptionprotected void onDirectMessage(twitter4j.internal.org.json.JSONObject json,
StreamListener[] listeners)
throws TwitterException,
twitter4j.internal.org.json.JSONException
TwitterExceptiontwitter4j.internal.org.json.JSONExceptionprotected void onDelete(twitter4j.internal.org.json.JSONObject json,
StreamListener[] listeners)
throws TwitterException,
twitter4j.internal.org.json.JSONException
TwitterExceptiontwitter4j.internal.org.json.JSONExceptionprotected void onLimit(twitter4j.internal.org.json.JSONObject json,
StreamListener[] listeners)
throws TwitterException,
twitter4j.internal.org.json.JSONException
TwitterExceptiontwitter4j.internal.org.json.JSONExceptionprotected void onStallWarning(twitter4j.internal.org.json.JSONObject json,
StreamListener[] listeners)
throws TwitterException,
twitter4j.internal.org.json.JSONException
TwitterExceptiontwitter4j.internal.org.json.JSONExceptionprotected void onScrubGeo(twitter4j.internal.org.json.JSONObject json,
StreamListener[] listeners)
throws TwitterException,
twitter4j.internal.org.json.JSONException
TwitterExceptiontwitter4j.internal.org.json.JSONExceptionprotected void onFriends(twitter4j.internal.org.json.JSONObject json,
StreamListener[] listeners)
throws TwitterException,
twitter4j.internal.org.json.JSONException
TwitterExceptiontwitter4j.internal.org.json.JSONExceptionprotected void onFavorite(twitter4j.internal.org.json.JSONObject source,
twitter4j.internal.org.json.JSONObject target,
twitter4j.internal.org.json.JSONObject targetObject,
StreamListener[] listeners)
throws TwitterException
TwitterExceptionprotected void onUnfavorite(twitter4j.internal.org.json.JSONObject source,
twitter4j.internal.org.json.JSONObject target,
twitter4j.internal.org.json.JSONObject targetObject,
StreamListener[] listeners)
throws TwitterException
TwitterExceptionprotected void onFollow(twitter4j.internal.org.json.JSONObject source,
twitter4j.internal.org.json.JSONObject target,
StreamListener[] listeners)
throws TwitterException
TwitterExceptionprotected void onUnfollow(twitter4j.internal.org.json.JSONObject source,
twitter4j.internal.org.json.JSONObject target,
StreamListener[] listeners)
throws TwitterException
TwitterExceptionprotected void onUserListMemberAddition(twitter4j.internal.org.json.JSONObject addedMember,
twitter4j.internal.org.json.JSONObject owner,
twitter4j.internal.org.json.JSONObject userList,
StreamListener[] listeners)
throws TwitterException,
twitter4j.internal.org.json.JSONException
TwitterExceptiontwitter4j.internal.org.json.JSONExceptionprotected void onUserListMemberDeletion(twitter4j.internal.org.json.JSONObject deletedMember,
twitter4j.internal.org.json.JSONObject owner,
twitter4j.internal.org.json.JSONObject userList,
StreamListener[] listeners)
throws TwitterException,
twitter4j.internal.org.json.JSONException
TwitterExceptiontwitter4j.internal.org.json.JSONExceptionprotected void onUserListSubscription(twitter4j.internal.org.json.JSONObject source,
twitter4j.internal.org.json.JSONObject owner,
twitter4j.internal.org.json.JSONObject userList,
StreamListener[] listeners)
throws TwitterException,
twitter4j.internal.org.json.JSONException
TwitterExceptiontwitter4j.internal.org.json.JSONExceptionprotected void onUserListUnsubscription(twitter4j.internal.org.json.JSONObject source,
twitter4j.internal.org.json.JSONObject owner,
twitter4j.internal.org.json.JSONObject userList,
StreamListener[] listeners)
throws TwitterException,
twitter4j.internal.org.json.JSONException
TwitterExceptiontwitter4j.internal.org.json.JSONExceptionprotected void onUserListCreation(twitter4j.internal.org.json.JSONObject source,
twitter4j.internal.org.json.JSONObject userList,
StreamListener[] listeners)
throws TwitterException,
twitter4j.internal.org.json.JSONException
TwitterExceptiontwitter4j.internal.org.json.JSONExceptionprotected void onUserListUpdated(twitter4j.internal.org.json.JSONObject source,
twitter4j.internal.org.json.JSONObject userList,
StreamListener[] listeners)
throws TwitterException,
twitter4j.internal.org.json.JSONException
TwitterExceptiontwitter4j.internal.org.json.JSONExceptionprotected void onUserListDestroyed(twitter4j.internal.org.json.JSONObject source,
twitter4j.internal.org.json.JSONObject userList,
StreamListener[] listeners)
throws TwitterException
TwitterExceptionprotected void onUserUpdate(twitter4j.internal.org.json.JSONObject source,
twitter4j.internal.org.json.JSONObject target,
StreamListener[] listeners)
throws TwitterException
TwitterExceptionprotected void onBlock(twitter4j.internal.org.json.JSONObject source,
twitter4j.internal.org.json.JSONObject target,
StreamListener[] listeners)
throws TwitterException
TwitterExceptionprotected void onUnblock(twitter4j.internal.org.json.JSONObject source,
twitter4j.internal.org.json.JSONObject target,
StreamListener[] listeners)
throws TwitterException
TwitterExceptionprotected void onDisconnectionNotice(java.lang.String line,
StreamListener[] listeners)
protected void onException(java.lang.Exception e,
StreamListener[] listeners)
public void close()
throws java.io.IOException
close in interface StatusStreamjava.io.IOExceptionprotected Status asStatus(twitter4j.internal.org.json.JSONObject json) throws TwitterException
TwitterExceptionprotected DirectMessage asDirectMessage(twitter4j.internal.org.json.JSONObject json) throws TwitterException
TwitterExceptionprotected long[] asFriendList(twitter4j.internal.org.json.JSONObject json)
throws TwitterException
TwitterExceptionprotected User asUser(twitter4j.internal.org.json.JSONObject json) throws TwitterException
TwitterExceptionprotected UserList asUserList(twitter4j.internal.org.json.JSONObject json) throws TwitterException
TwitterExceptionpublic abstract void next(StatusListener listener) throws TwitterException
StatusStreamnext in interface StatusStreamlistener - a StatusListener implementationTwitterException - when the end of the stream has been reached.public abstract void next(StreamListener[] listeners, RawStreamListener[] rawStreamListeners) throws TwitterException
TwitterExceptionpublic void onException(java.lang.Exception e,
StreamListener[] listeners,
RawStreamListener[] rawStreamListeners)