public class OkHttpEventStream extends EventStreamReader implements EventStream
| Modifier and Type | Method and Description |
|---|---|
void |
cancel()
Cancels the underlying connection to the current stream.
|
void |
close()
Close the current stream.
|
protected boolean |
isActive() |
boolean |
isOpen()
Whether or not the stream is still active.
|
Event |
nextEvent()
The next event in this event stream.
|
protected String |
readLine()
Read the next line of a stream from a given source.
|
processEventpublic Event nextEvent() throws IOException
EventStreamnextEvent in interface EventStreamIOException - general i/o related errorsprotected boolean isActive()
protected String readLine() throws IOException
EventStreamReaderreadLine in class EventStreamReaderIOException - if a stream is in the wrong state, IO errors can be thrownpublic boolean isOpen()
EventStreamReaderisOpen in interface EventStreamisOpen in class EventStreamReaderpublic void close()
throws IOException
EventStreamclose in interface EventStreamIOException - can throw exception if internal buffer not closed properlypublic void cancel()
EventStreamcancel in interface EventStream