public interface EventListener<T>
RequestBuilder classes stream method.| Modifier and Type | Method and Description |
|---|---|
void |
onEvent(T object)
This method will be called when new event is sent by a server.
|
void |
onFailure(java.util.Optional<java.lang.Throwable> error,
java.util.Optional<java.lang.Integer> responseCode)
This method will be called when the stream encounters an error.
|
void onEvent(T object)
object - object deserialized from the event datavoid onFailure(java.util.Optional<java.lang.Throwable> error,
java.util.Optional<java.lang.Integer> responseCode)
error - exception which caused the failureresponseCode - the HTTP status code from the event stream response