java.lang.Object
flare.eventbus.EventHandler.Builder<T>
- Enclosing interface:
- EventHandler<T>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionexpirationCount(int expirationCount) Removes this listener after it has been executed the given number of times.expireWhen(Predicate<T> expireWhen) Expires this listener when it passes the given condition.Adds a filter to the executor of this listener.ignoreCancelled(boolean ignoreCancelled) Specifies if the handler should still be called ifEventContext.isCancelled()returnstrue.
-
Constructor Details
-
Builder
protected Builder()
-
-
Method Details
-
filter
Adds a filter to the executor of this listener. The executor will only be called if this condition passes on the given event. -
ignoreCancelled
Specifies if the handler should still be called ifEventContext.isCancelled()returnstrue.Default is set to
true.- Parameters:
ignoreCancelled- True to stop processing the event when cancelled
-
expirationCount
Removes this listener after it has been executed the given number of times.- Parameters:
expirationCount- The number of times to execute
-
expireWhen
Expires this listener when it passes the given condition. The expiration will happen before the event is executed.- Parameters:
expireWhen- The condition to test
-
build
-