public class EventSource extends Object implements ConnectionHandler, Closeable
| Modifier and Type | Field and Description |
|---|---|
static org.slf4j.Logger |
log |
| Constructor and Description |
|---|
EventSource(URI uri,
long reconnectTimeMillis,
okhttp3.Headers headers,
EventSourceHandler eventSourceHandler) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
init() |
void |
setLastEventId(String lastEventId) |
void |
setReconnectionTimeMillis(long reconnectionTimeMillis) |
public EventSource(URI uri, long reconnectTimeMillis, okhttp3.Headers headers, EventSourceHandler eventSourceHandler)
public void init()
public void setReconnectionTimeMillis(long reconnectionTimeMillis)
setReconnectionTimeMillis in interface ConnectionHandlerpublic void setLastEventId(String lastEventId)
setLastEventId in interface ConnectionHandlerpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionCopyright © 2017. All rights reserved.