Package com.eventstore.dbclient
Class SubscriptionListener
java.lang.Object
com.eventstore.dbclient.SubscriptionListener
Listener used to handle catch-up subscription notifications raised throughout its lifecycle.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidonCancelled(Subscription subscription, 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.
-
Constructor Details
-
SubscriptionListener
public SubscriptionListener()
-
-
Method Details
-
onEvent
Called when EventStoreDB sends an event to the subscription.- Parameters:
subscription- handle to the subscription.event- a resolved event.
-
onCancelled
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
Called when the subscription is confirmed by the server.- Parameters:
subscription- handle to the subscription.
-
onCaughtUp
Called when the subscription has reached the head of the stream.- Parameters:
subscription- handle to the subscription.
-
onFellBehind
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.
-