Enum Class InvocationOrder
- All Implemented Interfaces:
Serializable, Comparable<InvocationOrder>, Constable
An event priority during execution set by the corresponding
EventListener annotation for the listener.- Since:
- 4.0
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe associated event listener gets called earlier than normal listeners.The associated event listener has the highest priority and will be called first.The associated event listener is called last in the event invocation chain.The associated event listener is called after all normal and early event listeners and has a more decisive place in the outcome of the called event.The last invoked listener in the chain.The normal order entry each event listener without a specific order assigned to it will use. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic InvocationOrderReturns the enum constant of this class with the specified name.static InvocationOrder[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
FIRST
The associated event listener has the highest priority and will be called first. All other event listeners will be called after that one. This should mainly get used for monitoring reasons or to early set the result of an event, allowing other listeners to still modify it. -
EARLY
The associated event listener gets called earlier than normal listeners. -
NORMAL
The normal order entry each event listener without a specific order assigned to it will use. This order is perfectly aligned between the early listeners and the late listeners, allowing plugins or modules to adjust their outcome over normal registered listeners. -
LATE
The associated event listener is called after all normal and early event listeners and has a more decisive place in the outcome of the called event. This priority should be used if no real need is there to really decide about the outcome of an event, but normal listeners should be overridden nevertheless. -
LAST
The associated event listener is called last in the event invocation chain. The associated listener always decides about the outcome of an event and overrides all other values set before. -
MONITOR
The last invoked listener in the chain. Associated listeners with that priority should NEVER make changes to the called event and only monitor the outcome of the event (for example to log the event status).
-
-
Constructor Details
-
InvocationOrder
private InvocationOrder()
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-