|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |
@Documented @Inherited @Target(value=METHOD) public @interface Subscribe
Annotates a method as an event handler. Whenever an event is posted on an event bus, all methods
with this annotation in all objects that have been registered on the event bus will be invoked if
they can handle the type of event being posted. An event handler method can handle a given event
if that event can be assigned to the single argument to that method. It is an error for a method
annotated with Subscribe
to accept zero or more than one arguments.
By default, all event handlers are registered at priority 0 with no filtering. Subscribe
can be combined with WithPriority
to override
the former and When
to override the latter.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |