@Slf4j @AutoFinal @CompileStatic class ActorEventBus extends AbstractEventBus implements java.io.Closeable
An event bus that delivers events through a Groovy Actor.
Every notification is queued on a single reactor actor, so subscribers run one event at a time, in publication order, off the publishing thread. The actor runs on Groovy's default async executor unless an executor is supplied.
| Modifiers | Name | Description |
|---|---|---|
class |
ActorEventBus.Notification |
A queued notification: the event, the subscriptions it was published to, and the optional reply handler. |
| Fields inherited from class | Fields |
|---|---|
class AbstractEventBus |
subscriptions |
| Constructor and description |
|---|
ActorEventBus() |
ActorEventBus(java.util.concurrent.Executor executor)
|
| Type Params | Return Type | Name and description |
|---|---|---|
|
protected java.util.concurrent.Callable |
buildNotificationCallable(Event event, java.util.Collection<Subscription> eventSubscriptions, Closure reply) |
|
void |
close() |
|
boolean |
isActive() |
| Methods inherited from class | Name |
|---|---|
class AbstractEventBus |
buildClosureSubscription, buildNotificationCallable, buildNotificationTrigger, buildSubscriberSubscription, isActive, notify, notify, notify, on, publish, publish, publish, sendAndReceive, sendAndReceive, subscribe, subscribe, unsubscribeAll |
executor - the executor the actor's processing loop runs on, or null
for Groovy's default async executor