java.lang.Object
org.palladiosimulator.analyzer.slingshot.eventdriver.entity.Subscriber<T>
Type Parameters:
T - The event type
All Implemented Interfaces:
io.reactivex.rxjava3.disposables.Disposable, io.reactivex.rxjava3.functions.Consumer<T>, Comparable<Subscriber<T>>, InterceptorInformation

public class Subscriber<T> extends Object implements io.reactivex.rxjava3.functions.Consumer<T>, io.reactivex.rxjava3.disposables.Disposable, Comparable<Subscriber<T>>, InterceptorInformation
A subscriber to an event of type T that should be activated upon the event. It holds a reference to a EventHandler.

It also holds further information about

  • A non-negative number priority (default is 0). Subscribers are compared based on its priority.
  • An array of reified types.
  • A name that identifies this subscriber.
  • The event type itself (reified).
  • The associated contracts to this subscriber.
  • Optionally the enclosing type where the event handler is residing (i.e. if the event handler is a Java Method).
  • Optionally Pre and Post interceptors specifically for this subscriber.
Regarding the comparison, it is only comparable to other subscribers of the same event!