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(<any> error,
<any> responseCode)
This method will be called when the stream encounters an error.
|
void onEvent(T object)
object
- object deserialized from the event datavoid onFailure(<any> error, <any> responseCode)
error
- exception which caused the failureresponseCode
- the HTTP status code from the event stream response