@Retention(value=RUNTIME)
@Target(value=METHOD)
public @interface Subscribe
Modifier and Type | Optional Element and Description |
---|---|
boolean |
deduplicate
Ignore next event if it's same as previous one.
|
java.lang.String |
eventId
Only subscribe the events which are posted with the specified event id.
|
long |
interval
The event will be ignored if the interval between this event and last event is less than the specified
interval . |
boolean |
sticky
If true, delivers the most recent sticky event (posted with
EventBus.postSticky(Object) ) to this subscriber (if event available). |
boolean |
strictEventType
Only accept the events which have extract same class type as the method parameter if it's true.
|
com.landawn.abacus.util.ThreadMode |
threadMode |
public abstract com.landawn.abacus.util.ThreadMode threadMode
public abstract boolean strictEventType
true
and false
is the event id has to match.public abstract boolean sticky
EventBus.postSticky(Object)
) to this subscriber (if event available).public abstract java.lang.String eventId