Package akka.event.japi
Class SubchannelEventBus<E,S,C>
- java.lang.Object
-
- akka.event.japi.SubchannelEventBus<E,S,C>
-
- All Implemented Interfaces:
EventBus<E,S,C>
public abstract class SubchannelEventBus<E,S,C> extends java.lang.Object implements EventBus<E,S,C>
Java API: See documentation forSubchannelClassificationE is the Event type S is the Subscriber type C is the Classifier type
-
-
Constructor Summary
Constructors Constructor Description SubchannelEventBus()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract Cclassify(E event)Returns the Classifier associated with the given Eventvoidpublish(E event)Publishes the specified Event to this busprotected abstract voidpublish(E event, S subscriber)Publishes the given Event to the given Subscriberabstract Subclassification<C>subclassification()The logic to form sub-class hierarchybooleansubscribe(S subscriber, C to)Attempts 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
-
-
-
Method Detail
-
classify
protected abstract C classify(E event)
Returns the Classifier associated with the given Event
-
publish
protected abstract void publish(E event, S subscriber)
Publishes the given Event to the given Subscriber
-
publish
public void publish(E event)
Description copied from interface:EventBusPublishes the specified Event to this bus
-
subclassification
public abstract Subclassification<C> subclassification()
The logic to form sub-class hierarchy
-
subscribe
public boolean subscribe(S subscriber, C to)
Description copied from interface:EventBusAttempts to register the subscriber to the specified Classifier
-
unsubscribe
public boolean unsubscribe(S subscriber, C from)
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)
-
-