twitter4j
Class StatusStreamImpl

java.lang.Object
  extended by twitter4j.StatusStreamImpl
All Implemented Interfaces:
StatusStream

 class StatusStreamImpl
extends java.lang.Object
implements StatusStream

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

Field Summary
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 Summary
StatusStreamImpl(twitter4j.internal.http.HttpResponse response)
           
StatusStreamImpl(java.io.InputStream stream)
           
 
Method Summary
 void close()
          
 void next(StatusListener listener)
          Reads next status from this stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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
Constructor Detail

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
Method Detail

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.

close

public void close()
           throws java.io.IOException

Specified by:
close in interface StatusStream
Throws:
java.io.IOException