twitter4j
Class UserStreamImpl
java.lang.Object
twitter4j.AbstractStreamImplementation
twitter4j.StatusStreamImpl
twitter4j.UserStreamImpl
- All Implemented Interfaces:
- StatusStream, StreamImplementation, UserStream
class UserStreamImpl
- extends StatusStreamImpl
- implements UserStream
- Since:
- Twitter4J 2.1.8
- Author:
- Yusuke Yamamoto - yusuke at mac.com
Method Summary |
void |
next(StreamListener[] listeners)
|
void |
next(UserStreamListener listener)
Reads next element from this stream. |
protected void |
onBlock(twitter4j.internal.org.json.JSONObject source,
twitter4j.internal.org.json.JSONObject target)
|
protected void |
onDirectMessage(twitter4j.internal.org.json.JSONObject json)
|
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 |
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 |
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 |
onUserListCreation(twitter4j.internal.org.json.JSONObject source,
twitter4j.internal.org.json.JSONObject target)
|
protected void |
onUserListDestroyed(twitter4j.internal.org.json.JSONObject source,
twitter4j.internal.org.json.JSONObject target)
|
protected void |
onUserListMemberAddition(twitter4j.internal.org.json.JSONObject addedMember,
twitter4j.internal.org.json.JSONObject owner,
twitter4j.internal.org.json.JSONObject target)
|
protected void |
onUserListMemberDeletion(twitter4j.internal.org.json.JSONObject deletedMember,
twitter4j.internal.org.json.JSONObject owner,
twitter4j.internal.org.json.JSONObject target)
|
protected void |
onUserListSubscription(twitter4j.internal.org.json.JSONObject source,
twitter4j.internal.org.json.JSONObject owner,
twitter4j.internal.org.json.JSONObject target)
|
protected void |
onUserListUnsubscription(twitter4j.internal.org.json.JSONObject source,
twitter4j.internal.org.json.JSONObject owner,
twitter4j.internal.org.json.JSONObject target)
|
protected void |
onUserListUpdated(twitter4j.internal.org.json.JSONObject source,
twitter4j.internal.org.json.JSONObject target)
|
protected void |
onUserUpdate(twitter4j.internal.org.json.JSONObject source,
twitter4j.internal.org.json.JSONObject target)
|
protected java.lang.String |
parseLine(java.lang.String line)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UserStreamImpl
UserStreamImpl(twitter4j.internal.async.Dispatcher dispatcher,
java.io.InputStream stream,
Configuration conf)
throws java.io.IOException
- Throws:
java.io.IOException
UserStreamImpl
UserStreamImpl(twitter4j.internal.async.Dispatcher dispatcher,
twitter4j.internal.http.HttpResponse response,
Configuration conf)
throws java.io.IOException
- Throws:
java.io.IOException
next
public void next(UserStreamListener listener)
throws TwitterException
- Reads next element from this stream.
- Specified by:
next
in interface UserStream
- Parameters:
listener
- a UserStreamListener implementation
- Throws:
TwitterException
- when the end of the stream has been reached.
next
public void next(StreamListener[] listeners)
throws TwitterException
- Specified by:
next
in interface StreamImplementation
- Overrides:
next
in class StatusStreamImpl
- Throws:
TwitterException
parseLine
protected java.lang.String parseLine(java.lang.String line)
- Overrides:
parseLine
in class StatusStreamImpl
onSender
protected void onSender(twitter4j.internal.org.json.JSONObject json)
throws TwitterException
- Overrides:
onSender
in class AbstractStreamImplementation
- Throws:
TwitterException
onDirectMessage
protected void onDirectMessage(twitter4j.internal.org.json.JSONObject json)
throws TwitterException,
twitter4j.internal.org.json.JSONException
- Overrides:
onDirectMessage
in class AbstractStreamImplementation
- Throws:
TwitterException
twitter4j.internal.org.json.JSONException
onScrubGeo
protected void onScrubGeo(twitter4j.internal.org.json.JSONObject json)
throws TwitterException
- Overrides:
onScrubGeo
in class StatusStreamImpl
- Throws:
TwitterException
onFriends
protected void onFriends(twitter4j.internal.org.json.JSONObject json)
throws TwitterException,
twitter4j.internal.org.json.JSONException
- Overrides:
onFriends
in class AbstractStreamImplementation
- Throws:
TwitterException
twitter4j.internal.org.json.JSONException
onFavorite
protected void onFavorite(twitter4j.internal.org.json.JSONObject source,
twitter4j.internal.org.json.JSONObject target,
twitter4j.internal.org.json.JSONObject targetObject)
throws TwitterException
- Overrides:
onFavorite
in class AbstractStreamImplementation
- Throws:
TwitterException
onUnfavorite
protected void onUnfavorite(twitter4j.internal.org.json.JSONObject source,
twitter4j.internal.org.json.JSONObject target,
twitter4j.internal.org.json.JSONObject targetObject)
throws TwitterException
- Overrides:
onUnfavorite
in class AbstractStreamImplementation
- Throws:
TwitterException
onRetweet
protected void onRetweet(twitter4j.internal.org.json.JSONObject source,
twitter4j.internal.org.json.JSONObject target,
twitter4j.internal.org.json.JSONObject targetObject)
throws TwitterException
- Overrides:
onRetweet
in class AbstractStreamImplementation
- Throws:
TwitterException
onFollow
protected void onFollow(twitter4j.internal.org.json.JSONObject source,
twitter4j.internal.org.json.JSONObject target)
throws TwitterException
- Overrides:
onFollow
in class AbstractStreamImplementation
- Throws:
TwitterException
onUserListMemberAddition
protected void onUserListMemberAddition(twitter4j.internal.org.json.JSONObject addedMember,
twitter4j.internal.org.json.JSONObject owner,
twitter4j.internal.org.json.JSONObject target)
throws TwitterException,
twitter4j.internal.org.json.JSONException
- Overrides:
onUserListMemberAddition
in class AbstractStreamImplementation
- Throws:
TwitterException
twitter4j.internal.org.json.JSONException
onUserListMemberDeletion
protected void onUserListMemberDeletion(twitter4j.internal.org.json.JSONObject deletedMember,
twitter4j.internal.org.json.JSONObject owner,
twitter4j.internal.org.json.JSONObject target)
throws TwitterException,
twitter4j.internal.org.json.JSONException
- Overrides:
onUserListMemberDeletion
in class AbstractStreamImplementation
- Throws:
TwitterException
twitter4j.internal.org.json.JSONException
onUserListSubscription
protected void onUserListSubscription(twitter4j.internal.org.json.JSONObject source,
twitter4j.internal.org.json.JSONObject owner,
twitter4j.internal.org.json.JSONObject target)
throws TwitterException,
twitter4j.internal.org.json.JSONException
- Overrides:
onUserListSubscription
in class AbstractStreamImplementation
- Throws:
TwitterException
twitter4j.internal.org.json.JSONException
onUserListUnsubscription
protected void onUserListUnsubscription(twitter4j.internal.org.json.JSONObject source,
twitter4j.internal.org.json.JSONObject owner,
twitter4j.internal.org.json.JSONObject target)
throws TwitterException,
twitter4j.internal.org.json.JSONException
- Overrides:
onUserListUnsubscription
in class AbstractStreamImplementation
- Throws:
TwitterException
twitter4j.internal.org.json.JSONException
onUserListCreation
protected void onUserListCreation(twitter4j.internal.org.json.JSONObject source,
twitter4j.internal.org.json.JSONObject target)
throws TwitterException,
twitter4j.internal.org.json.JSONException
- Overrides:
onUserListCreation
in class AbstractStreamImplementation
- Throws:
TwitterException
twitter4j.internal.org.json.JSONException
onUserListUpdated
protected void onUserListUpdated(twitter4j.internal.org.json.JSONObject source,
twitter4j.internal.org.json.JSONObject target)
throws TwitterException,
twitter4j.internal.org.json.JSONException
- Overrides:
onUserListUpdated
in class AbstractStreamImplementation
- Throws:
TwitterException
twitter4j.internal.org.json.JSONException
onUserListDestroyed
protected void onUserListDestroyed(twitter4j.internal.org.json.JSONObject source,
twitter4j.internal.org.json.JSONObject target)
throws TwitterException
- Overrides:
onUserListDestroyed
in class AbstractStreamImplementation
- Throws:
TwitterException
onUserUpdate
protected void onUserUpdate(twitter4j.internal.org.json.JSONObject source,
twitter4j.internal.org.json.JSONObject target)
throws TwitterException
- Overrides:
onUserUpdate
in class AbstractStreamImplementation
- Throws:
TwitterException
onBlock
protected void onBlock(twitter4j.internal.org.json.JSONObject source,
twitter4j.internal.org.json.JSONObject target)
throws TwitterException
- Overrides:
onBlock
in class AbstractStreamImplementation
- Throws:
TwitterException
onUnblock
protected void onUnblock(twitter4j.internal.org.json.JSONObject source,
twitter4j.internal.org.json.JSONObject target)
throws TwitterException
- Overrides:
onUnblock
in class AbstractStreamImplementation
- Throws:
TwitterException
onException
public void onException(java.lang.Exception e)
- Specified by:
onException
in interface StreamImplementation
- Overrides:
onException
in class StatusStreamImpl