- OkSse - Class in com.here.oksse
-
OkSse is a plugin for OkHttp library that extends its functionality to create a Server Sent Event client.
- OkSse() - Constructor for class com.here.oksse.OkSse
-
Create a OkSse using a new instance of OkHttpClient with the default settings.
- OkSse(OkHttpClient) - Constructor for class com.here.oksse.OkSse
-
Creates a new OkSse using the shared OkHttpClient
- onClosed(ServerSentEvent) - Method in interface com.here.oksse.ServerSentEvent.Listener
-
Notify that the connection was closed.
- onComment(ServerSentEvent, String) - Method in interface com.here.oksse.ServerSentEvent.Listener
-
Called every time a comment is received.
- onMessage(ServerSentEvent, String, String, String) - Method in interface com.here.oksse.ServerSentEvent.Listener
-
Called every time a message is received.
- onOpen(ServerSentEvent, Response) - Method in interface com.here.oksse.ServerSentEvent.Listener
-
Notify when the connection is open an established.
- onPreRetry(ServerSentEvent, Request) - Method in interface com.here.oksse.ServerSentEvent.Listener
-
Notifies client before retrying to connect.
- onRetryError(ServerSentEvent, Throwable, Response) - Method in interface com.here.oksse.ServerSentEvent.Listener
-
Notify when the connection failed either because it could not be establish or the connection broke.
- onRetryTime(ServerSentEvent, long) - Method in interface com.here.oksse.ServerSentEvent.Listener
-
The stream can define the retry time sending a message with "retry: milliseconds"
If this event is received this method will be called with the sent value