|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
H
- type of the class containing the event handler method. This can be a general type like
Object
, in which case the filter can be applied in any class.E
- type of event to which the filter applies. This can be a general type like
Object
, in which can the filter can be applied to any handler method.public interface EventFilter<H,E>
A filter capable of preventing an event handler method from receiving events. Filters are applied
to event handlers using then When
annotation. Filtering can be done based on the class
containing the event handler, the event itself, or a combination of the two.
Note that all event handlers MUST define a zero-argument public constructor.
Method Summary | |
---|---|
boolean |
accepts(H handler,
E event)
Returns whether or not the given handler's Subscribe
method should be invoked for the given event. |
Method Detail |
---|
boolean accepts(H handler, E event)
Subscribe
method should be invoked for the given event. If this method returns false
, the
underlying event handler will never be called.
handler
- class containing the Subscribe
-
annotated method to which the event is about to be dispatchedevent
- event currently being dispatched
true
to allow the method to handle the event, false
to
prevent it
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |