public abstract class SubscriptionListener
extends java.lang.Object
| Constructor and Description |
|---|
SubscriptionListener() |
| Modifier and Type | Method and Description |
|---|---|
void |
onCancelled(Subscription subscription,
java.lang.Throwable exception)
Called when the subscription is cancelled or dropped.
|
void |
onCaughtUp(Subscription subscription,
java.time.Instant timestamp,
java.lang.Long streamRevision,
Position position)
Called when the subscription has reached the head of the stream.
|
void |
onConfirmation(Subscription subscription)
Called when the subscription is confirmed by the server.
|
void |
onEvent(Subscription subscription,
ResolvedEvent event)
Called when EventStoreDB sends an event to the subscription.
|
void |
onFellBehind(Subscription subscription,
java.time.Instant timestamp,
java.lang.Long streamRevision,
Position position)
Called when the subscription has fallen behind, meaning it's no longer keeping up with the
stream's pace.
|
public void onEvent(Subscription subscription, ResolvedEvent event)
subscription - handle to the subscription.event - a resolved event.public void onCancelled(Subscription subscription, java.lang.Throwable exception)
subscription - handle to the subscription.exception - an exception. null if the user initiated the cancellation.public void onConfirmation(Subscription subscription)
subscription - handle to the subscription.public void onCaughtUp(Subscription subscription, java.time.Instant timestamp, java.lang.Long streamRevision, Position position)
subscription - handle to the subscription.public void onFellBehind(Subscription subscription, java.time.Instant timestamp, java.lang.Long streamRevision, Position position)
subscription - handle to the subscription.