class SiteStreamsImpl extends StatusStreamBase
StatusStreamBase.StreamEvent
Modifier and Type | Field and Description |
---|---|
private StreamController |
cs |
protected static RawStreamListener[] |
EMPTY |
private static java.lang.ThreadLocal<java.lang.Long> |
forUser |
CONF, dispatcher, factory, logger
Constructor and Description |
---|
SiteStreamsImpl(twitter4j.internal.async.Dispatcher dispatcher,
twitter4j.internal.http.HttpResponse response,
Configuration conf,
StreamController cs) |
SiteStreamsImpl(twitter4j.internal.async.Dispatcher dispatcher,
java.io.InputStream stream,
Configuration conf,
StreamController cs) |
Modifier and Type | Method and Description |
---|---|
void |
next(StatusListener listener)
Reads next status from this stream.
|
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) |
void |
onDisconnectionNotice(java.lang.String line,
StreamListener[] listeners) |
void |
onException(java.lang.Exception ex,
StreamListener[] listeners) |
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 |
onMessage(java.lang.String rawString,
RawStreamListener[] 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) |
asDirectMessage, asFriendList, asStatus, asUser, asUserList, close, handleNextElement, onException, onLimit, onScrubGeo, onSender, onStallWarning
private final StreamController cs
private static java.lang.ThreadLocal<java.lang.Long> forUser
protected static final RawStreamListener[] EMPTY
SiteStreamsImpl(twitter4j.internal.async.Dispatcher dispatcher, java.io.InputStream stream, Configuration conf, StreamController cs) throws java.io.IOException
java.io.IOException
SiteStreamsImpl(twitter4j.internal.async.Dispatcher dispatcher, twitter4j.internal.http.HttpResponse response, Configuration conf, StreamController cs) throws java.io.IOException
java.io.IOException
protected java.lang.String parseLine(java.lang.String line)
parseLine
in class StatusStreamBase
protected void onMessage(java.lang.String rawString, RawStreamListener[] listeners) throws TwitterException
onMessage
in class StatusStreamBase
TwitterException
protected void onStatus(twitter4j.internal.org.json.JSONObject json, StreamListener[] listeners) throws TwitterException
onStatus
in class StatusStreamBase
TwitterException
protected void onDelete(twitter4j.internal.org.json.JSONObject json, StreamListener[] listeners) throws twitter4j.internal.org.json.JSONException
onDelete
in class StatusStreamBase
twitter4j.internal.org.json.JSONException
protected void onDirectMessage(twitter4j.internal.org.json.JSONObject json, StreamListener[] listeners) throws TwitterException
onDirectMessage
in class StatusStreamBase
TwitterException
protected void onFriends(twitter4j.internal.org.json.JSONObject json, StreamListener[] listeners) throws TwitterException, twitter4j.internal.org.json.JSONException
onFriends
in class StatusStreamBase
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, StreamListener[] listeners) throws TwitterException
onFavorite
in class StatusStreamBase
TwitterException
protected void onUnfavorite(twitter4j.internal.org.json.JSONObject source, twitter4j.internal.org.json.JSONObject target, twitter4j.internal.org.json.JSONObject targetObject, StreamListener[] listeners) throws TwitterException
onUnfavorite
in class StatusStreamBase
TwitterException
protected void onFollow(twitter4j.internal.org.json.JSONObject source, twitter4j.internal.org.json.JSONObject target, StreamListener[] listeners) throws TwitterException
onFollow
in class StatusStreamBase
TwitterException
protected void onUnfollow(twitter4j.internal.org.json.JSONObject source, twitter4j.internal.org.json.JSONObject target, StreamListener[] listeners) throws TwitterException
onUnfollow
in class StatusStreamBase
TwitterException
protected 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
onUserListMemberAddition
in class StatusStreamBase
TwitterException
twitter4j.internal.org.json.JSONException
protected 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
onUserListMemberDeletion
in class StatusStreamBase
TwitterException
twitter4j.internal.org.json.JSONException
protected 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
onUserListSubscription
in class StatusStreamBase
TwitterException
twitter4j.internal.org.json.JSONException
protected 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
onUserListUnsubscription
in class StatusStreamBase
TwitterException
twitter4j.internal.org.json.JSONException
protected void onUserListCreation(twitter4j.internal.org.json.JSONObject source, twitter4j.internal.org.json.JSONObject userList, StreamListener[] listeners) throws TwitterException, twitter4j.internal.org.json.JSONException
onUserListCreation
in class StatusStreamBase
TwitterException
twitter4j.internal.org.json.JSONException
protected void onUserListUpdated(twitter4j.internal.org.json.JSONObject source, twitter4j.internal.org.json.JSONObject userList, StreamListener[] listeners) throws TwitterException, twitter4j.internal.org.json.JSONException
onUserListUpdated
in class StatusStreamBase
TwitterException
twitter4j.internal.org.json.JSONException
protected void onUserListDestroyed(twitter4j.internal.org.json.JSONObject source, twitter4j.internal.org.json.JSONObject userList, StreamListener[] listeners) throws TwitterException
onUserListDestroyed
in class StatusStreamBase
TwitterException
protected void onUserUpdate(twitter4j.internal.org.json.JSONObject source, twitter4j.internal.org.json.JSONObject target, StreamListener[] listeners) throws TwitterException
onUserUpdate
in class StatusStreamBase
TwitterException
protected void onBlock(twitter4j.internal.org.json.JSONObject source, twitter4j.internal.org.json.JSONObject target, StreamListener[] listeners) throws TwitterException
onBlock
in class StatusStreamBase
TwitterException
protected void onUnblock(twitter4j.internal.org.json.JSONObject source, twitter4j.internal.org.json.JSONObject target, StreamListener[] listeners) throws TwitterException
onUnblock
in class StatusStreamBase
TwitterException
public void onException(java.lang.Exception ex, StreamListener[] listeners)
onException
in class StatusStreamBase
public void next(StatusListener listener) throws TwitterException
StatusStream
next
in interface StatusStream
next
in class StatusStreamBase
listener
- a StatusListener implementationTwitterException
- when the end of the stream has been reached.public void next(StreamListener[] listeners, RawStreamListener[] rawStreamListeners) throws TwitterException
next
in class StatusStreamBase
TwitterException
public void onDisconnectionNotice(java.lang.String line, StreamListener[] listeners)
onDisconnectionNotice
in class StatusStreamBase