class StatusStreamImpl extends java.lang.Object implements StatusStream, UserStream
| Modifier and Type | Field and Description |
|---|---|
private java.io.BufferedReader |
br |
private java.io.InputStream |
is |
private static twitter4j.internal.logging.Logger |
logger |
private twitter4j.internal.http.HttpResponse |
response |
private boolean |
streamAlive |
| Constructor and Description |
|---|
StatusStreamImpl(twitter4j.internal.http.HttpResponse response) |
StatusStreamImpl(java.io.InputStream stream) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
(package private) Status |
extractTargetObject(twitter4j.internal.org.json.JSONObject json) |
private void |
handleNextElement(java.util.List<StatusListener> listeners) |
(package private) void |
next(java.util.List<StatusListener> listeners) |
void |
next(StatusListener listener)
Reads next status from this stream.
|
void |
next(UserStreamListener listener)
Reads next element from this stream.
|
private 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
StatusStreamImpl(java.io.InputStream stream)
throws java.io.IOException
java.io.IOExceptionStatusStreamImpl(twitter4j.internal.http.HttpResponse response)
throws java.io.IOException
java.io.IOExceptionpublic void next(UserStreamListener listener) throws TwitterException
next in interface UserStreamlistener - a UserStreamListener implementationTwitterException - when the end of the stream has been reached.public void next(StatusListener listener) throws TwitterException
next in interface StatusStreamlistener - a StatusListener implementationTwitterException - when the end of the stream has been reached.void next(java.util.List<StatusListener> listeners) throws TwitterException
TwitterExceptionprivate void handleNextElement(java.util.List<StatusListener> listeners) throws TwitterException
TwitterExceptionStatus extractTargetObject(twitter4j.internal.org.json.JSONObject json) throws twitter4j.internal.org.json.JSONException, TwitterException
twitter4j.internal.org.json.JSONExceptionTwitterExceptionpublic void close()
throws java.io.IOException
close in interface StatusStreamclose in interface UserStreamjava.io.IOException