| Package | Description |
|---|---|
| org.openstreetmap.josm.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 ConcurrentMap<Class<?>,CopyOnWriteArraySet<Subscriber>> |
SubscriberRegistry.subscribers
All registered subscribers, indexed by event type.
|
private Iterator<Subscriber> |
Dispatcher.PerThreadQueuedDispatcher.Event.subscribers |
| Modifier and Type | Method and Description |
|---|---|
(package private) static Subscriber |
Subscriber.create(EventBus bus,
Object listener,
Method method)
Creates a
Subscriber for method on listener. |
| Modifier and Type | Method and Description |
|---|---|
private MultiMap<Class<?>,Subscriber> |
SubscriberRegistry.findAllSubscribers(Object listener)
Returns all subscribers for the given listener grouped by the type of event they subscribe to.
|
(package private) Iterator<Subscriber> |
SubscriberRegistry.getSubscribers(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) Set<Subscriber> |
SubscriberRegistry.getSubscribersForTesting(Class<?> eventType)
Returns subscribers for given
eventType. |
| Modifier and Type | Method and Description |
|---|---|
(package private) abstract void |
Dispatcher.dispatch(Object event,
Iterator<Subscriber> subscribers)
Dispatches the given
event to the given subscribers. |
(package private) void |
Dispatcher.PerThreadQueuedDispatcher.dispatch(Object event,
Iterator<Subscriber> subscribers) |
(package private) void |
Dispatcher.LegacyAsyncDispatcher.dispatch(Object event,
Iterator<Subscriber> subscribers) |
(package private) void |
Dispatcher.ImmediateDispatcher.dispatch(Object event,
Iterator<Subscriber> subscribers) |
| Constructor and Description |
|---|
EventWithSubscriber(Object event,
Subscriber subscriber) |
| Constructor and Description |
|---|
Event(Object event,
Iterator<Subscriber> subscribers) |