Enum Class InvocationOrder

java.lang.Object
java.lang.Enum<InvocationOrder>
eu.cloudnetservice.driver.event.InvocationOrder
All Implemented Interfaces:
Serializable, Comparable<InvocationOrder>, Constable

public enum InvocationOrder extends Enum<InvocationOrder>
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 Constants
    Enum Constant
    Description
    The 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
    Modifier
    Constructor
    Description
    private
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the enum constant of this class with the specified name.
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • FIRST

      public static final InvocationOrder 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

      public static final InvocationOrder EARLY
      The associated event listener gets called earlier than normal listeners.
    • NORMAL

      public static final InvocationOrder 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

      public static final InvocationOrder 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

      public static final InvocationOrder 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

      public static final InvocationOrder 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

      public static InvocationOrder[] 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

      public static InvocationOrder valueOf(String name)
      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 name
      NullPointerException - if the argument is null