Class HandlerEntry

java.lang.Object
com.ultikits.ultitools.entities.HandlerEntry
All Implemented Interfaces:
Comparable<HandlerEntry>

public class HandlerEntry extends Object implements Comparable<HandlerEntry>
Internal representation of a registered event handler.
Since:
6.2.2
  • Field Details

    • eventType

      private final Class<? extends ModuleEvent> eventType
    • priority

      private final EventPriority priority
    • ignoreCancelled

      private final boolean ignoreCancelled
    • ownerModule

      private final String ownerModule
    • ownerInstance

      private final UltiToolsPlugin ownerInstance
      The module instance that registered this handler, or null when the registration named only a module name (#506). EventBus#unregisterByOwnerInstance releases by it.
      Since:
      6.3.0
    • method

      private final Method method
    • instance

      private final Object instance
    • consumer

      private final Consumer<? extends ModuleEvent> consumer
  • Constructor Details

    • HandlerEntry

      public HandlerEntry(Class<? extends ModuleEvent> eventType, EventPriority priority, boolean ignoreCancelled, String ownerModule, Method method, Object instance)
      Constructor for annotation-based handlers.
    • HandlerEntry

      public HandlerEntry(Class<? extends ModuleEvent> eventType, EventPriority priority, boolean ignoreCancelled, String ownerModule, UltiToolsPlugin ownerInstance, Method method, Object instance)
      Constructor for annotation-based handlers that records the registering module instance (#506).
      Parameters:
      eventType - the event type handled
      priority - the dispatch priority
      ignoreCancelled - whether a cancelled event skips this handler
      ownerModule - the owning module's name
      ownerInstance - the owning module instance, or null
      method - the handler method
      instance - the bean the method is invoked on
      Since:
      6.3.0
    • HandlerEntry

      public HandlerEntry(Class<? extends ModuleEvent> eventType, EventPriority priority, boolean ignoreCancelled, String ownerModule, Consumer<? extends ModuleEvent> consumer)
      Constructor for programmatic handlers.
    • HandlerEntry

      public HandlerEntry(Class<? extends ModuleEvent> eventType, EventPriority priority, boolean ignoreCancelled, String ownerModule, UltiToolsPlugin ownerInstance, Consumer<? extends ModuleEvent> consumer)
      Constructor for programmatic handlers that records the registering module instance (#506).
      Parameters:
      eventType - the event type handled
      priority - the dispatch priority
      ignoreCancelled - whether a cancelled event skips this handler
      ownerModule - the owning module's name
      ownerInstance - the owning module instance, or null
      consumer - the handler
      Since:
      6.3.0
  • Method Details