twitter4j
Class StatusStreamImpl
java.lang.Object
twitter4j.StatusStreamImpl
- All Implemented Interfaces:
- StatusStream, UserStream
class StatusStreamImpl
- extends java.lang.Object
- implements StatusStream, UserStream
StatusStream implementation. This class is NOT intended to be extended but left non-final for the ease of mock testing.
- Since:
- Twitter4J 2.1.2
- Author:
- Yusuke Yamamoto - yusuke at mac.com
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logger
private 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
nullAdapter
private static final UserStreamAdapter nullAdapter
StatusStreamImpl
StatusStreamImpl(java.io.InputStream stream)
throws java.io.IOException
- Throws:
java.io.IOException
StatusStreamImpl
StatusStreamImpl(twitter4j.internal.http.HttpResponse response)
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(StatusListener listener)
throws TwitterException
- Reads next status from this stream.
- Specified by:
next
in interface StatusStream
- Parameters:
listener
- a StatusListener implementation
- Throws:
TwitterException
- when the end of the stream has been reached.
handleNextElement
private void handleNextElement(StatusListener listener,
UserStreamListener userStreamListener)
throws TwitterException
- Throws:
TwitterException
close
public void close()
throws java.io.IOException
-
- Specified by:
close
in interface StatusStream
- Specified by:
close
in interface UserStream
- Throws:
java.io.IOException