Class SubscriptionListener

java.lang.Object
com.eventstore.dbclient.SubscriptionListener

public abstract class SubscriptionListener extends Object
Listener used to handle catch-up subscription notifications raised throughout its lifecycle.
  • Constructor Details

    • SubscriptionListener

      public SubscriptionListener()
  • Method Details

    • 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, 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.