Package com.eventstore.dbclient
Class SubscriptionListener
- java.lang.Object
-
- com.eventstore.dbclient.SubscriptionListener
-
public abstract class SubscriptionListener extends java.lang.ObjectListener used to handle catch-up subscription notifications raised throughout its lifecycle.
-
-
Constructor Summary
Constructors Constructor Description SubscriptionListener()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidonCancelled(Subscription subscription, java.lang.Throwable exception)Called when the subscription is cancelled or dropped.voidonCaughtUp(Subscription subscription)Called when the subscription has reached the head of the stream.voidonConfirmation(Subscription subscription)Called when the subscription is confirmed by the server.voidonEvent(Subscription subscription, ResolvedEvent event)Called when EventStoreDB sends an event to the subscription.voidonFellBehind(Subscription subscription)Called when the subscription has fallen behind, meaning it's no longer keeping up with the stream's pace.
-
-
-
Method Detail
-
onEvent
public void onEvent(Subscription subscription, ResolvedEvent event)
Called when EventStoreDB sends an event to the subscription.- Parameters:
subscription- handle to the subscription.event- a resolved event.
-
onCancelled
public void onCancelled(Subscription subscription, java.lang.Throwable exception)
Called when the subscription is cancelled or dropped.- Parameters:
subscription- handle to the subscription.exception- an exception. null if the user initiated the cancellation.
-
onConfirmation
public void onConfirmation(Subscription subscription)
Called when the subscription is confirmed by the server.- Parameters:
subscription- handle to the subscription.
-
onCaughtUp
public void onCaughtUp(Subscription subscription)
Called when the subscription has reached the head of the stream.- Parameters:
subscription- handle to the subscription.
-
onFellBehind
public void onFellBehind(Subscription subscription)
Called when the subscription has fallen behind, meaning it's no longer keeping up with the stream's pace.- Parameters:
subscription- handle to the subscription.
-
-