Package com.landawn.abacus.eventBus
Annotation Interface Subscribe
- Since:
- 0.8
- Author:
- Haiyang Li
-
Optional Element Summary
Modifier and TypeOptional ElementDescriptionboolean
Ignore next event if it's same as previous one.Only subscribe the events which are posted with the specified event id.long
The event will be ignored if the interval between this event and last event is less than the specifiedinterval
.boolean
If true, delivers the most recent sticky event (posted withEventBus.postSticky(Object)
) to this subscriber (if event available).boolean
Only accept the events which have extract same class type as the method parameter if it's true.
-
Element Details
-
threadMode
ThreadMode threadMode- Default:
- DEFAULT
-
strictEventType
boolean strictEventTypeOnly accept the events which have extract same class type as the method parameter if it's true. Otherwise, accept all the events which can be assigned to the parameter type. The precondition for bothtrue
andfalse
is the event id has to match.- Returns:
- true, if successful
- Default:
- false
-
sticky
boolean stickyIf true, delivers the most recent sticky event (posted withEventBus.postSticky(Object)
) to this subscriber (if event available).- Returns:
- true, if successful
- Default:
- false
-
eventId
String eventIdOnly subscribe the events which are posted with the specified event id.- Returns:
- Default:
- ""
-
interval
long intervalThe event will be ignored if the interval between this event and last event is less than the specifiedinterval
.- Returns:
- Default:
- 0L
-
deduplicate
boolean deduplicateIgnore next event if it's same as previous one.- Returns:
- true, if successful
- Default:
- false
-