Package | Description |
---|---|
com.google.common.eventbus |
The EventBus allows publish-subscribe-style communication between components
without requiring the components to explicitly register with one another
(and thus be aware of each other).
|
Modifier and Type | Class and Description |
---|---|
(package private) class |
SynchronizedEventSubscriber
Wraps a single-argument subscriber method on a specific object, and ensures
that only one thread may enter the method at a time.
|
Modifier and Type | Field and Description |
---|---|
(package private) EventSubscriber |
EventBus.EventWithSubscriber.subscriber |
Modifier and Type | Field and Description |
---|---|
private SetMultimap<java.lang.Class<?>,EventSubscriber> |
EventBus.subscribersByType
All registered event subscribers, indexed by event type.
|
Modifier and Type | Method and Description |
---|---|
private static EventSubscriber |
AnnotatedSubscriberFinder.makeSubscriber(java.lang.Object listener,
java.lang.reflect.Method method)
Creates an
EventSubscriber for subsequently calling method on
listener . |
Modifier and Type | Method and Description |
---|---|
Multimap<java.lang.Class<?>,EventSubscriber> |
AnnotatedSubscriberFinder.findAllSubscribers(java.lang.Object listener)
Finds all suitable event subscriber methods in
source , organizes them
by the type of event they handle, and wraps them in EventSubscriber instances. |
Multimap<java.lang.Class<?>,EventSubscriber> |
SubscriberFindingStrategy.findAllSubscribers(java.lang.Object source)
Finds all suitable event subscriber methods in
source , organizes them
by the type of event they handle, and wraps them in EventSubscriber instances. |
Modifier and Type | Method and Description |
---|---|
(package private) void |
AsyncEventBus.dispatch(java.lang.Object event,
EventSubscriber subscriber)
|
(package private) void |
EventBus.dispatch(java.lang.Object event,
EventSubscriber wrapper)
Dispatches
event to the subscriber in wrapper . |
(package private) void |
AsyncEventBus.enqueueEvent(java.lang.Object event,
EventSubscriber subscriber) |
(package private) void |
EventBus.enqueueEvent(java.lang.Object event,
EventSubscriber subscriber)
Queue the
event for dispatch during
EventBus.dispatchQueuedEvents() . |
Constructor and Description |
---|
EventWithSubscriber(java.lang.Object event,
EventSubscriber subscriber) |