public class ListenerEventDispatcher extends Object implements Runnable
Also, this is intended to be used to message methods that either return void, or have a return which the developer using this class is uninterested in receiving.
Modifier and Type | Class and Description |
---|---|
protected static class |
ListenerEventDispatcher.TripletContainer |
Modifier and Type | Field and Description |
---|---|
protected boolean |
hasFinishedDispatching |
protected boolean |
isRunning |
protected ArrayList<ListenerEventDispatcher.TripletContainer> |
triplets |
Constructor and Description |
---|
ListenerEventDispatcher() |
Modifier and Type | Method and Description |
---|---|
void |
addListenerTriplet(Object listenerInstance,
Method listenerMethod,
Object[] methodArguments)
Add a listener triplet - the instance of the listener to be messaged, the Method on which
the listener should be messaged, and the Object array of arguments to be supplied to the
Method.
|
boolean |
hasFinished()
Has finished.
|
void |
run() |
protected transient ArrayList<ListenerEventDispatcher.TripletContainer> triplets
protected transient boolean hasFinishedDispatching
protected transient boolean isRunning
public ListenerEventDispatcher()
public void addListenerTriplet(Object listenerInstance, Method listenerMethod, Object[] methodArguments)
listenerInstance
- the instance of the listener to receive the associated notificationlistenerMethod
- the Method instance representing the method through which notification
will occurmethodArguments
- the arguments supplied to the notification methodpublic boolean hasFinished()