twitter4j
Class AbstractStreamImplementation
java.lang.Object
twitter4j.AbstractStreamImplementation
- Direct Known Subclasses:
- SiteStreamsImpl, StatusStreamImpl
abstract class AbstractStreamImplementation
- extends java.lang.Object
- Since:
- Twitter4J 2.1.8
- Author:
- Yusuke Yamamoto - yusuke at mac.com
Field Summary |
private java.io.BufferedReader |
br
|
private Configuration |
CONF
|
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
|
Method Summary |
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()
|
(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 |
onUnfollow(twitter4j.internal.org.json.JSONObject source,
twitter4j.internal.org.json.JSONObject target)
|
protected void |
onUserListCreation(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 |
onUserListMemberAddition(twitter4j.internal.org.json.JSONObject addedMember,
twitter4j.internal.org.json.JSONObject owner,
twitter4j.internal.org.json.JSONObject userList)
|
protected void |
onUserListMemberDeletion(twitter4j.internal.org.json.JSONObject deletedMember,
twitter4j.internal.org.json.JSONObject owner,
twitter4j.internal.org.json.JSONObject userList)
|
protected void |
onUserListSubscription(twitter4j.internal.org.json.JSONObject source,
twitter4j.internal.org.json.JSONObject owner,
twitter4j.internal.org.json.JSONObject userList)
|
protected void |
onUserListUnsubscription(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)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logger
protected static final twitter4j.internal.logging.Logger logger
streamAlive
private boolean streamAlive
br
private java.io.BufferedReader br
is
private java.io.InputStream is
response
private twitter4j.internal.http.HttpResponse response
dispatcher
protected final twitter4j.internal.async.Dispatcher dispatcher
CONF
private final Configuration CONF
AbstractStreamImplementation
AbstractStreamImplementation(twitter4j.internal.async.Dispatcher dispatcher,
java.io.InputStream stream,
Configuration conf)
throws java.io.IOException
- Throws:
java.io.IOException
AbstractStreamImplementation
AbstractStreamImplementation(twitter4j.internal.async.Dispatcher dispatcher,
twitter4j.internal.http.HttpResponse response,
Configuration conf)
throws java.io.IOException
- Throws:
java.io.IOException
parseLine
protected java.lang.String parseLine(java.lang.String line)
next
abstract void next(StreamListener[] listeners)
throws TwitterException
- Throws:
TwitterException
handleNextElement
protected void handleNextElement()
throws TwitterException
- Throws:
TwitterException
onSender
protected void onSender(twitter4j.internal.org.json.JSONObject json)
throws TwitterException
- Throws:
TwitterException
onStatus
protected void onStatus(twitter4j.internal.org.json.JSONObject json)
throws TwitterException
- Throws:
TwitterException
onDirectMessage
protected void onDirectMessage(twitter4j.internal.org.json.JSONObject json)
throws TwitterException,
twitter4j.internal.org.json.JSONException
- Throws:
TwitterException
twitter4j.internal.org.json.JSONException
onDelete
protected void onDelete(twitter4j.internal.org.json.JSONObject json)
throws TwitterException,
twitter4j.internal.org.json.JSONException
- Throws:
TwitterException
twitter4j.internal.org.json.JSONException
onLimit
protected void onLimit(twitter4j.internal.org.json.JSONObject json)
throws TwitterException,
twitter4j.internal.org.json.JSONException
- Throws:
TwitterException
twitter4j.internal.org.json.JSONException
onScrubGeo
protected void onScrubGeo(twitter4j.internal.org.json.JSONObject json)
throws TwitterException,
twitter4j.internal.org.json.JSONException
- Throws:
TwitterException
twitter4j.internal.org.json.JSONException
onFriends
protected void onFriends(twitter4j.internal.org.json.JSONObject json)
throws TwitterException,
twitter4j.internal.org.json.JSONException
- 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
- 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
- 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
- Throws:
TwitterException
onFollow
protected void onFollow(twitter4j.internal.org.json.JSONObject source,
twitter4j.internal.org.json.JSONObject target)
throws TwitterException
- Throws:
TwitterException
onUnfollow
protected void onUnfollow(twitter4j.internal.org.json.JSONObject source,
twitter4j.internal.org.json.JSONObject target)
throws TwitterException
- Throws:
TwitterException
onUserListMemberAddition
protected void onUserListMemberAddition(twitter4j.internal.org.json.JSONObject addedMember,
twitter4j.internal.org.json.JSONObject owner,
twitter4j.internal.org.json.JSONObject userList)
throws TwitterException,
twitter4j.internal.org.json.JSONException
- 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 userList)
throws TwitterException,
twitter4j.internal.org.json.JSONException
- 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 userList)
throws TwitterException,
twitter4j.internal.org.json.JSONException
- 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 userList)
throws TwitterException,
twitter4j.internal.org.json.JSONException
- Throws:
TwitterException
twitter4j.internal.org.json.JSONException
onUserListCreation
protected void onUserListCreation(twitter4j.internal.org.json.JSONObject source,
twitter4j.internal.org.json.JSONObject userList)
throws TwitterException,
twitter4j.internal.org.json.JSONException
- Throws:
TwitterException
twitter4j.internal.org.json.JSONException
onUserListUpdated
protected void onUserListUpdated(twitter4j.internal.org.json.JSONObject source,
twitter4j.internal.org.json.JSONObject userList)
throws TwitterException,
twitter4j.internal.org.json.JSONException
- Throws:
TwitterException
twitter4j.internal.org.json.JSONException
onUserListDestroyed
protected void onUserListDestroyed(twitter4j.internal.org.json.JSONObject source,
twitter4j.internal.org.json.JSONObject userList)
throws TwitterException
- Throws:
TwitterException
onUserUpdate
protected void onUserUpdate(twitter4j.internal.org.json.JSONObject source,
twitter4j.internal.org.json.JSONObject target)
throws TwitterException
- Throws:
TwitterException
onBlock
protected void onBlock(twitter4j.internal.org.json.JSONObject source,
twitter4j.internal.org.json.JSONObject target)
throws TwitterException
- Throws:
TwitterException
onUnblock
protected void onUnblock(twitter4j.internal.org.json.JSONObject source,
twitter4j.internal.org.json.JSONObject target)
throws TwitterException
- Throws:
TwitterException
onException
protected void onException(java.lang.Exception e)
close
public void close()
throws java.io.IOException
- Throws:
java.io.IOException
asStatus
protected Status asStatus(twitter4j.internal.org.json.JSONObject json)
throws TwitterException
- Throws:
TwitterException
asDirectMessage
protected DirectMessage asDirectMessage(twitter4j.internal.org.json.JSONObject json)
throws TwitterException
- Throws:
TwitterException
asFriendList
protected long[] asFriendList(twitter4j.internal.org.json.JSONObject json)
throws TwitterException
- Throws:
TwitterException
asUser
protected User asUser(twitter4j.internal.org.json.JSONObject json)
throws TwitterException
- Throws:
TwitterException
asUserList
protected UserList asUserList(twitter4j.internal.org.json.JSONObject json)
throws TwitterException
- Throws:
TwitterException