Interface Subscription

All Superinterfaces:
AutoCloseable, Terminable
All Known Subinterfaces:
MergedSubscription<T>, SingleSubscription<T>

public interface Subscription extends Terminable
Represents a subscription to a given (set of) event(s).
  • Method Details

    • isActive

      boolean isActive()
      Gets whether the handler is active
      Returns:
      if the handler is active
    • getCallCounter

      long getCallCounter()
      Gets the number of times the handler has been called
      Returns:
      the number of times the handler has been called
    • unregister

      boolean unregister()
      Unregisters the handler
      Returns:
      true if the handler wasn't already unregistered
    • close

      default void close()
      Description copied from interface: Terminable
      Closes this resource.
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Terminable
    • getFunctions

      @Deprecated Collection<Object> getFunctions()
      Deprecated.
      not API, subject to change or removal
      Gets the functional handlers and filters used by this subscription.
      Returns:
      the functions used by this subscription.