It is possible to receive your nearest events in real time as follows
session.getNotification().addNotificationListener(new AbstractNotificationCallback() {
@Override
public void onEvent(@NotNull Event event) {
// received Event
}
});
session.websocket.onEvent((event: Event) => {
});
session.websocket.onEvent((event) => {
});