public interface GenericListener<T>
GenericListenerSupport
listener infrastructure.T-Plan Robot Enterprise, (C) 2009-2022 T-Plan Limited. All rights reserved.
Modifier and Type | Method and Description |
---|---|
void |
genericEvent(T listener,
EventObject event,
Object customObject)
Call the listener method on a particular listener.
|
void genericEvent(T listener, EventObject event, Object customObject)
ChangeListener
the method should call
listener.stateChanged((ChangeEvent)event)
. This method will
be called by the GenericListenerSupport.fireEvent(com.tplan.robot.util.GenericListener, java.util.EventObject, java.lang.Object)
method for each registered listener.listener
- the registered listener.event
- an event to fire to the listener. The implementing class should
check whether it is an appropriate event matching the listener type and
throw an IllegalArgumentException
if not. For example, if the listener
is a ChangeListener
the event must be a ChangeEvent
.customObject
- an optional object allowing the implementing class to transfer
data between individual call of this method. For example, the argument may be a
List where the method will store all exceptions thrown by the listener to.