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.IOException
StatusStreamImpl(twitter4j.internal.http.HttpResponse response) throws java.io.IOException
java.io.IOException
public void next(UserStreamListener listener) throws TwitterException
next
in interface UserStream
listener
- a UserStreamListener implementationTwitterException
- when the end of the stream has been reached.public void next(StatusListener listener) throws TwitterException
next
in interface StatusStream
listener
- a StatusListener implementationTwitterException
- when the end of the stream has been reached.void next(java.util.List<StatusListener> listeners) throws TwitterException
TwitterException
private void handleNextElement(java.util.List<StatusListener> listeners) throws TwitterException
TwitterException
Status extractTargetObject(twitter4j.internal.org.json.JSONObject json) throws twitter4j.internal.org.json.JSONException, TwitterException
twitter4j.internal.org.json.JSONException
TwitterException
public void close() throws java.io.IOException
close
in interface StatusStream
close
in interface UserStream
java.io.IOException