public class ListenerEventDispatcher extends java.lang.Object implements java.lang.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 java.util.ArrayList<ListenerEventDispatcher.TripletContainer> |
triplets |
Constructor and Description |
---|
ListenerEventDispatcher() |
Modifier and Type | Method and Description |
---|---|
void |
addListenerTriplet(java.lang.Object listenerInstance,
java.lang.reflect.Method listenerMethod,
java.lang.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 java.util.ArrayList<ListenerEventDispatcher.TripletContainer> triplets
protected transient boolean hasFinishedDispatching
protected transient boolean isRunning
public ListenerEventDispatcher()
public void addListenerTriplet(java.lang.Object listenerInstance, java.lang.reflect.Method listenerMethod, java.lang.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()
public void run()
run
in interface java.lang.Runnable