Uses of Interface
dk.cloudcreate.essentials.reactive.EventBus
Packages that use EventBus
-
Uses of EventBus in dk.cloudcreate.essentials.reactive
Classes in dk.cloudcreate.essentials.reactive that implement EventBusModifier and TypeClassDescriptionfinal classSimple event bus that supports both synchronous and asynchronous subscribers that are registered and listening for events published within the local the JVM
You can have multiple instances of the LocalEventBus deployed with the local JVM, but usually one event bus is sufficient.
Example:Methods in dk.cloudcreate.essentials.reactive that return EventBusModifier and TypeMethodDescriptionEventBus.addAsyncSubscriber(EventHandler subscriber) Add an asynchronous subscriber/consumerLocalEventBus.addAsyncSubscriber(EventHandler subscriber) EventBus.addSyncSubscriber(EventHandler subscriber) Add a synchronous subscriber/consumerLocalEventBus.addSyncSubscriber(EventHandler subscriber) Publish the event to all subscribers/consumer
First we call all asynchronous subscribers, after which we will call all synchronous subscribers on the calling thread (i.e. on the same thread that the publish method is called on)EventBus.removeAsyncSubscriber(EventHandler subscriber) Remove an asynchronous subscriber/consumerLocalEventBus.removeAsyncSubscriber(EventHandler subscriber) EventBus.removeSyncSubscriber(EventHandler subscriber) Remove a synchronous subscriber/consumerLocalEventBus.removeSyncSubscriber(EventHandler subscriber)