public interface EventListener
EventStream
.Modifier and Type | Method and Description |
---|---|
void |
onEvent(BoxEvent event)
Invoked when an event is received from the API.
|
boolean |
onException(Throwable e)
Invoked when an error occurs while waiting for events to be received.
|
void onEvent(BoxEvent event)
event
- the received event.boolean onException(Throwable e)
When an EventStream encounters an exception, it will invoke this method on each of its listeners until one of them returns true, indicating that the exception was handled.
e
- the exception that was thrown while waiting for events.