Interface Subscriber<T>
-
- Type Parameters:
T- the type of messages of theSubscribercan 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 ofSubscribers. ASubscribercan accept messages and is uniquely identified by aSubscriptionId.- See Also:
- EventMaid Documentation
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description AcceptingBehavioraccept(T message)Delivers the message to theSubscriber.SubscriptionIdgetSubscriptionId()The unique and constantSubscriptionIdof theSubscriber.
-
-
-
Method Detail
-
accept
AcceptingBehavior accept(T message)
Delivers the message to theSubscriber. TheSubscribercan decide, if the delivery continues or is preempted by returning the respectiveAcceptingBehavior.- Parameters:
message- the message- Returns:
AcceptingBehaviorto continue or preempt delivery
-
getSubscriptionId
SubscriptionId getSubscriptionId()
The unique and constantSubscriptionIdof theSubscriber.- Returns:
- the
Subscriber'sSubscriptionId
-
-