Package com.eventstore.dbclient
Class PersistentSubscriptionListener
java.lang.Object
com.eventstore.dbclient.PersistentSubscriptionListener
Listener used to handle persistent subscription notifications raised throughout its lifecycle.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidonCancelled(PersistentSubscription subscription, Throwable exception) Called when the subscription is cancelled or dropped.voidonConfirmation(PersistentSubscription subscription) Called when the subscription is confirmed by the server.voidonEvent(PersistentSubscription subscription, int retryCount, ResolvedEvent event) Called when EventStoreDB sends an event to the persistent subscription.
-
Constructor Details
-
PersistentSubscriptionListener
public PersistentSubscriptionListener()
-
-
Method Details
-
onEvent
Called when EventStoreDB sends an event to the persistent subscription.- Parameters:
subscription- handle to the persistent subscription.retryCount- how many times the event was retried.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.
-