Class EventBusImpl
- java.lang.Object
-
- de.quantummaid.eventmaid.qcec.eventBus.EventBusImpl
-
-
Constructor Summary
Constructors Constructor Description EventBusImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidpublish(Object event)Send the event to all interested subscribers.<T> SubscriptionIdreactTo(Class<T> tClass, Consumer<T> consumer)Adds theConsumerasSubscriberfor the given event class.voidunsubscribe(SubscriptionId subscriptionId)Removes allSubscribersmatching the givenSubscriptionId.
-
-
-
Method Detail
-
publish
public void publish(Object event)
Description copied from interface:EventBusSend the event to all interested subscribers.
-
reactTo
public <T> SubscriptionId reactTo(Class<T> tClass, Consumer<T> consumer)
Description copied from interface:EventBusAdds theConsumerasSubscriberfor the given event class.
-
unsubscribe
public void unsubscribe(SubscriptionId subscriptionId)
Description copied from interface:EventBusRemoves allSubscribersmatching the givenSubscriptionId.- Specified by:
unsubscribein interfaceEventBus- Parameters:
subscriptionId- theSubscriptionIdto be removed
-
-