snaq.util
Interface EventNotifier<L extends EventListener,E extends EventObject>
public interface EventNotifier<L extends EventListener,E extends EventObject>
Interface defining an object that can notify an event listener.
This interface is used by the EventDispatcher
class to perform
the event notification. The dispatcher schedules event notification
asynchronously, then for each actual event notification the single method
of this interface is called.
- Author:
- Giles Winstanley
Method Summary |
void |
notifyListener(L listener,
E event)
Notifies the specified listener of the specified event. |
notifyListener
void notifyListener(L listener,
E event)
- Notifies the specified listener of the specified event.
Implementors should be aware that this method is not designed to throw
any exceptions, as it is called asynchronously by the
EventDispatcher
thread. This includes cases of
RuntimeException
which should be caught and dealt with,
otherwise the default behaiour is simply to print the stacktrace to
System.err
.