SUB_T - the interface implemented by the subscriberspublic class LocalDispatcher<SUB_T> extends Object implements Dispatcher<SUB_T>
SUB_T. They will provide a method that
allow obtaining the interface as a Dispatcher to prevent the private
interface from being obtained.| Constructor and Description |
|---|
LocalDispatcher()
Creates a new local dispatcher.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add_async(SUB_T subscriber)
Adds a new subscriber to the dispatcher using a asynchronous
subscription.
|
void |
add_sync(SUB_T subscriber)
Adds a new subscriber to the dispatcher using a synchronous
subscription.
|
void |
dispatch(DispatcherOp<SUB_T> op)
Dispatchers an event to all subscribers.
|
void |
remove(SUB_T subscriber)
Removes a previously registered subscriber from the dispatcher.
|
public void add_sync(SUB_T subscriber)
Dispatcheradd_sync in interface Dispatcher<SUB_T>subscriber - the subscriber, cannot be nullpublic void add_async(SUB_T subscriber)
Dispatcheradd_async in interface Dispatcher<SUB_T>subscriber - the subscriber, cannot be nullpublic void remove(SUB_T subscriber)
Dispatcherremove in interface Dispatcher<SUB_T>subscriber - the subscriber to remove, cannot be nullpublic void dispatch(DispatcherOp<SUB_T> op)
op - the event dispatching operation, cannot be nullCopyright © 2015. All rights reserved.