Package io.joshworks.stream.client.sse
Class SSEConnection
- java.lang.Object
-
- io.joshworks.stream.client.StreamConnection
-
- io.joshworks.stream.client.sse.SSEConnection
-
public class SSEConnection extends StreamConnection
Created by Josh Gontijo on 4/1/17.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classSSEConnection.DisconnectedStatistics
-
Field Summary
-
Fields inherited from class io.joshworks.stream.client.StreamConnection
monitor, shuttingDown, url, uuid, worker
-
-
Constructor Summary
Constructors Constructor Description SSEConnection(SseConfiguration clientConfiguration, java.lang.String lastEventId, SseClientCallback callback)
-
Method Summary
Modifier and Type Method Description java.lang.Stringclose()Close the this connection and return the Last-Event-IDprotected voidcloseChannel()booleanisOpen()io.undertow.client.ClientStatisticsstatistics()protected voidtryConnect()-
Methods inherited from class io.joshworks.stream.client.StreamConnection
closeChannel, connect, reconnect, reconnect
-
-
-
-
Constructor Detail
-
SSEConnection
public SSEConnection(SseConfiguration clientConfiguration, java.lang.String lastEventId, SseClientCallback callback)
-
-
Method Detail
-
tryConnect
protected void tryConnect() throws java.lang.Exception- Specified by:
tryConnectin classStreamConnection- Throws:
java.lang.Exception
-
close
public java.lang.String close()
Close the this connection and return the Last-Event-ID- Returns:
- Last-Event-ID if any
-
statistics
public io.undertow.client.ClientStatistics statistics()
-
closeChannel
protected void closeChannel()
- Specified by:
closeChannelin classStreamConnection
-
isOpen
public boolean isOpen()
-
-