public class BindEvent extends AppEvent
UnbindEvent,
Serialized Formsource| Constructor and Description |
|---|
BindEvent(Object pSource,
String pMethodToCallBack,
Class<? extends AppEvent> pAppEventToBindTo)
The constructor creates a BindEvent with the handed values and an
unbound hop-count.
|
BindEvent(Object pSource,
String pMethodToCallBack,
Class<? extends AppEvent> 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 responsibilty, at each hop
the forward() method should be called according to the AppEventSupport
"contract".
|
Method |
getMethod()
Returns the method object for the target object.
|
Object |
getTarget()
Returns the target for the binding.
|
Class<? extends AppEvent> |
getTriggerClass()
Returns the AppEvent derived class that the target is interested in.
|
consume, isConsumed, toStringgetSourcepublic BindEvent(Object pSource, String pMethodToCallBack, Class<? extends AppEvent> 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<? extends AppEvent> 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 Object getTarget()
public Method getMethod()
Copyright © 2017 Jürgen Zeller (privat). All rights reserved.