Package com.google.common.eventbus
Class AsyncEventBus
- java.lang.Object
-
- com.google.common.eventbus.EventBus
-
- com.google.common.eventbus.AsyncEventBus
-
-
Constructor Summary
Constructors Constructor Description AsyncEventBus(java.lang.String identifier, java.util.concurrent.Executor executor)
Creates a new AsyncEventBus that will useexecutor
to dispatch events.AsyncEventBus(java.util.concurrent.Executor executor)
Creates a new AsyncEventBus that will useexecutor
to dispatch events.
-
Method Summary
-
Methods inherited from class com.google.common.eventbus.EventBus
post, register, unregister
-
-
-
-
Constructor Detail
-
AsyncEventBus
public AsyncEventBus(java.lang.String identifier, java.util.concurrent.Executor executor)
Creates a new AsyncEventBus that will useexecutor
to dispatch events. Assignsidentifier
as the bus's name for logging purposes.- Parameters:
identifier
- short name for the bus, for logging purposes.executor
- Executor to use to dispatch events. It is the caller's responsibility to shut down the executor after the last event has been posted to this event bus.
-
AsyncEventBus
public AsyncEventBus(java.util.concurrent.Executor executor)
Creates a new AsyncEventBus that will useexecutor
to dispatch events.- Parameters:
executor
- Executor to use to dispatch events. It is the caller's responsibility to shut down the executor after the last event has been posted to this event bus.
-
-