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) static class |
Subscriber.SynchronizedSubscriber
Subscriber that synchronizes invocations of a method to ensure that only one thread may enter
the method at a time.
|
Modifier and Type | Field and Description |
---|---|
private Subscriber |
Dispatcher.LegacyAsyncDispatcher.EventWithSubscriber.subscriber |
Modifier and Type | Field and Description |
---|---|
private java.util.concurrent.ConcurrentMap<java.lang.Class<?>,java.util.concurrent.CopyOnWriteArraySet<Subscriber>> |
SubscriberRegistry.subscribers
All registered subscribers, indexed by event type.
|
private java.util.Iterator<Subscriber> |
Dispatcher.PerThreadQueuedDispatcher.Event.subscribers |
Modifier and Type | Method and Description |
---|---|
(package private) static Subscriber |
Subscriber.create(EventBus bus,
java.lang.Object listener,
java.lang.reflect.Method method)
Creates a
Subscriber for method on listener . |
Modifier and Type | Method and Description |
---|---|
private Multimap<java.lang.Class<?>,Subscriber> |
SubscriberRegistry.findAllSubscribers(java.lang.Object listener)
Returns all subscribers for the given listener grouped by the type of event they subscribe to.
|
(package private) java.util.Iterator<Subscriber> |
SubscriberRegistry.getSubscribers(java.lang.Object event)
Gets an iterator representing an immutable snapshot of all subscribers to the given event at
the time this method is called.
|
(package private) java.util.Set<Subscriber> |
SubscriberRegistry.getSubscribersForTesting(java.lang.Class<?> eventType) |
Modifier and Type | Method and Description |
---|---|
(package private) abstract void |
Dispatcher.dispatch(java.lang.Object event,
java.util.Iterator<Subscriber> subscribers)
Dispatches the given
event to the given subscribers . |
(package private) void |
Dispatcher.PerThreadQueuedDispatcher.dispatch(java.lang.Object event,
java.util.Iterator<Subscriber> subscribers) |
(package private) void |
Dispatcher.LegacyAsyncDispatcher.dispatch(java.lang.Object event,
java.util.Iterator<Subscriber> subscribers) |
(package private) void |
Dispatcher.ImmediateDispatcher.dispatch(java.lang.Object event,
java.util.Iterator<Subscriber> subscribers) |
Constructor and Description |
---|
EventWithSubscriber(java.lang.Object event,
Subscriber subscriber) |
Constructor and Description |
---|
Event(java.lang.Object event,
java.util.Iterator<Subscriber> subscribers) |