Skip to content

EventPriority

enum EventPriority
Package: dev.joid.lib.ui.event · Module: core · Source: EventPriority.java

The order in which the listeners of one event run, from HIGHEST to LOWEST, then MONITOR.

Listeners of the same priority run in the order they were added. Once a listener cancels or consumes the event, the listeners after it do not run, except the MONITOR ones.

ReturnsSignatureSummary
booleanisMonitor()Returns true for EventPriority.MONITOR.
ValueSummary
HIGHESTRuns before every other listener.
HIGHRuns after HIGHEST, before NORMAL.
NORMALThe priority of a plain lambda.
LOWRuns after NORMAL, before LOWEST.
LOWESTRuns after every other listener that can change the event.
MONITORRuns last, even after a cancel or a consume, and only reads: cancel() or consume() there throws an IllegalStateException.

boolean isMonitor()

Returns true for EventPriority.MONITOR.

HIGHEST

Runs before every other listener.

HIGH

Runs after HIGHEST, before NORMAL.

NORMAL

The priority of a plain lambda.

LOW

Runs after NORMAL, before LOWEST.

LOWEST

Runs after every other listener that can change the event.

MONITOR

Runs last, even after a cancel or a consume, and only reads: cancel() or consume() there throws an IllegalStateException. Use it to log or count what happened.


fluent returns the instance, typed for chaining · factory creates an instance · signal also accepts a value that follows signals, as a signal, an expression or a lambda (When does JOID compute this value again?) · hook called by JOID, override it · abstract you implement it · default interface method with a body · static called on the class · protected visible to subclasses

Report a problem with this page