Package org.apache.pekko.event.japi
Class ScanningEventBus<E,S,C>
java.lang.Object
org.apache.pekko.event.japi.ScanningEventBus<E,S,C>
- All Implemented Interfaces:
EventBus<E,S, C>
Java API: See documentation for
pekko.event.ScanningClassification
E is the Event type
S is the Subscriber type
C is the Classifier type-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract intcompareClassifiers(C a, C b) Provides a total ordering of Classifiers (think java.util.Comparator.compare)protected abstract intcompareSubscribers(S a, S b) Provides a total ordering of Subscribers (think java.util.Comparator.compare)protected abstract booleanReturns whether the specified Classifier matches the specified EventvoidPublishes the specified Event to this busprotected abstract voidPublishes the specified Event to the specified SubscriberbooleanAttempts to register the subscriber to the specified Classifiervoidunsubscribe(S subscriber) Attempts to deregister the subscriber from all Classifiers it may be subscribed tobooleanunsubscribe(S subscriber, C from) Attempts to deregister the subscriber from the specified Classifier
-
Constructor Details
-
ScanningEventBus
public ScanningEventBus()
-
-
Method Details
-
compareClassifiers
Provides a total ordering of Classifiers (think java.util.Comparator.compare) -
compareSubscribers
Provides a total ordering of Subscribers (think java.util.Comparator.compare) -
matches
Returns whether the specified Classifier matches the specified Event -
publish
Publishes the specified Event to the specified Subscriber -
publish
Description copied from interface:EventBusPublishes the specified Event to this bus -
subscribe
Description copied from interface:EventBusAttempts to register the subscriber to the specified Classifier -
unsubscribe
Description copied from interface:EventBusAttempts to deregister the subscriber from the specified Classifier- Specified by:
unsubscribein interfaceEventBus<E,S, C> - Returns:
- true if successful and false if not (because it wasn't subscribed to that Classifier, or otherwise)
-
unsubscribe
Description copied from interface:EventBusAttempts to deregister the subscriber from all Classifiers it may be subscribed to- Specified by:
unsubscribein interfaceEventBus<E,S, C>
-