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 |
onNextPosition(long position)
Invoked when an updated stream position is received from the API.
|
void onEvent(BoxEvent event)
event
- the received event.void onNextPosition(long position)
position
- of the stream.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.