public class BindEvent<T extends AppEvent> extends AppEvent
UnbindEvent,
Serialized Formsource| Constructor and Description |
|---|
BindEvent(Object pSource,
AppEventListener<T> pMethodToCallBack,
Class<T> pAppEventToBindTo)
The constructor creates a BindEvent with the handed values and an
unbound hop-count.
|
BindEvent(Object pSource,
AppEventListener<T> pMethodToCallBack,
Class<T> pAppEventToBindTo,
int pHopCount)
The constructor creates a BindEvent with the handed values.
|
BindEvent(Object pSource,
String pMethodToCallBack,
Class<T> pAppEventToBindTo)
The constructor creates a BindEvent with the handed values and an
unbound hop-count.
|
BindEvent(Object pSource,
String pMethodToCallBack,
Class<T> pAppEventToBindTo,
int pHopCount)
The constructor creates a BindEvent with the handed values.
|
| Modifier and Type | Method and Description |
|---|---|
void |
forward()
During the propagation in the chain of responsibility, at each hop
the forward() method should be called according to the AppEventSupport
"contract".
|
AppEventListener |
getMethodToCallBack()
Returns the method to call back.
|
Class<T> |
getTriggerClass()
Returns the AppEvent derived class that the target is interested in.
|
consume, isConsumed, toStringgetSourcepublic BindEvent(Object pSource, AppEventListener<T> pMethodToCallBack, Class<T> pAppEventToBindTo)
pSource - sender object, will receive the callbackpMethodToCallBack - method ot call back for the given AppEvent classpAppEventToBindTo - trigger class, must be a subclass of AppEventIllegalArgumentException - if one of the arguments is null
or the method is not known/not public.public BindEvent(Object pSource, AppEventListener<T> pMethodToCallBack, Class<T> pAppEventToBindTo, int pHopCount)
pSource - sender object, will receive the callbackpMethodToCallBack - method ot call back for the given AppEvent classpAppEventToBindTo - trigger class, must be a subclass of AppEventpHopCount - number of hops this event gets forwarded
before it consumes itself. If pHopCount is 0,
there is no hop limit.IllegalArgumentException - if one of the arguments is null,
pHopCount is negative or the method is not known/not public.public BindEvent(Object pSource, String pMethodToCallBack, Class<T> pAppEventToBindTo)
pSource - sender object, will receive the callbackpMethodToCallBack - method name of pSourcepAppEventToBindTo - trigger class, must be a subclass of AppEventIllegalArgumentException - if one of the arguments is null
or the method is not known/not public.public BindEvent(Object pSource, String pMethodToCallBack, Class<T> pAppEventToBindTo, int pHopCount)
pSource - sender object, will receive the callbackpMethodToCallBack - method name of pSourcepAppEventToBindTo - trigger class, must be a subclass of AppEventpHopCount - number of hops this event gets forwarded
before it consumes itself. If pHopCount is 0,
there is no hop limit.IllegalArgumentException - if one of the arguments is null,
pHopCount is negative or the method is not known/not public.public void forward()
public AppEventListener getMethodToCallBack()
Copyright © 2022 Jürgen Zeller (privat). All rights reserved.