public abstract class PersistentSubscriptionListener
extends java.lang.Object
| Constructor and Description |
|---|
PersistentSubscriptionListener() |
| Modifier and Type | Method and Description |
|---|---|
void |
onCancelled(PersistentSubscription subscription,
java.lang.Throwable exception)
Called when the subscription is cancelled or dropped.
|
void |
onConfirmation(PersistentSubscription subscription)
Called when the subscription is confirmed by the server.
|
void |
onEvent(PersistentSubscription subscription,
int retryCount,
ResolvedEvent event)
Called when KurrentDB sends an event to the persistent subscription.
|
public void onEvent(PersistentSubscription subscription, int retryCount, ResolvedEvent event)
subscription - handle to the persistent subscription.retryCount - how many times the event was retried.event - a resolved event.public void onCancelled(PersistentSubscription subscription, java.lang.Throwable exception)
subscription - handle to the subscription.exception - an exception. null if the user initiated the cancellation.public void onConfirmation(PersistentSubscription subscription)
subscription - handle to the subscription.