クラス HandlerUtil

java.lang.Object
net.ririfa.beacon.javaExtension.HandlerUtil

public class HandlerUtil extends Object
  • コンストラクタの詳細

    • HandlerUtil

      public HandlerUtil()
  • メソッドの詳細

    • handler

      public static <T extends net.ririfa.beacon.Event> kotlin.Unit handler(@NotNull IEventHandler instance, Class<T> eventType, Supplier<Boolean> condition, boolean ignoresCondition, net.ririfa.beacon.Priority priority, Handler<T> handler, Long timeout)
      Registers a handler for events of type T.
      型パラメータ:
      T - the type of the event to be handled
      パラメータ:
      instance - the event handler instance
      eventType - the class type of the event
      condition - a supplier providing the condition to be checked
      ignoresCondition - whether the condition should be ignored
      priority - the priority of the event handler
      handler - the handler to process the event
      timeout - the timeout for the event handler
      例外:
      IllegalStateException - if the listener is not registered
    • handler

      public static <T extends net.ririfa.beacon.Event> kotlin.Unit handler(@NotNull IEventHandler instance, Class<T> eventType, Handler<T> handler)
      Registers a handler for events of type T with default settings.
      型パラメータ:
      T - the type of the event to be handled
      パラメータ:
      instance - the event handler instance
      handler - the handler to process the event
    • returnableHandler

      public static <T extends net.ririfa.beacon.ReturnableEvent<R>, R> kotlin.Unit returnableHandler(@NotNull IEventHandler instance, Class<T> eventType, Supplier<Boolean> condition, boolean ignoresCondition, net.ririfa.beacon.Priority priority, ReturnableHandler<T,R> handler, Long timeout)
      Registers a handler for returnable events of type T.
      型パラメータ:
      T - the type of the event to be handled
      R - the type of the return value
      パラメータ:
      instance - the event handler instance
      condition - a supplier providing the condition to be checked
      ignoresCondition - whether the condition should be ignored
      priority - the priority of the event handler
      handler - the handler to process the event
      timeout - the timeout for the event handler
      例外:
      IllegalStateException - if the listener is not registered
    • returnableHandler

      public static <T extends net.ririfa.beacon.ReturnableEvent<R>, R> kotlin.Unit returnableHandler(IEventHandler instance, Class<T> eventType, ReturnableHandler<T,R> handler)
      Registers a handler for returnable events of type T with default settings.
      型パラメータ:
      T - the type of the event to be handled
      R - the type of the return value
      パラメータ:
      instance - the event handler instance
      handler - the handler to process the event