Interface Subscriber<T>

  • Type Parameters:
    T - the type of messages of the Subscriber can accept
    All Known Implementing Classes:
    ConsumerSubscriber, PreemptiveSubscriber

    public interface Subscriber<T>
    All delivering of messages to dynamically added and removed objects is done on the basis of Subscribers. A Subscriber can accept messages and is uniquely identified by a SubscriptionId.
    See Also:
    EventMaid Documentation
    • Method Detail

      • accept

        AcceptingBehavior accept​(T message)
        Delivers the message to the Subscriber. The Subscriber can decide, if the delivery continues or is preempted by returning the respective AcceptingBehavior.
        Parameters:
        message - the message
        Returns:
        AcceptingBehavior to continue or preempt delivery
      • getSubscriptionId

        SubscriptionId getSubscriptionId()
        The unique and constant SubscriptionId of the Subscriber.
        Returns:
        the Subscriber's SubscriptionId