Class EventBus

java.lang.Object
org.geysermc.event.bus.impl.EventBusImpl<Object,org.geysermc.floodgate.api.event.FloodgateSubscriber<?>>
org.geysermc.floodgate.core.event.EventBus
All Implemented Interfaces:
org.geysermc.event.bus.BaseBus<Object,org.geysermc.floodgate.api.event.FloodgateSubscriber<?>>, org.geysermc.event.bus.EventBus<Object,org.geysermc.floodgate.api.event.FloodgateSubscriber<?>>, org.geysermc.floodgate.api.event.FloodgateEventBus

public final class EventBus extends org.geysermc.event.bus.impl.EventBusImpl<Object,org.geysermc.floodgate.api.event.FloodgateSubscriber<?>> implements org.geysermc.floodgate.api.event.FloodgateEventBus
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected static <T extends U, U extends Object>
    Set<T>
     
    protected <T extends org.geysermc.event.subscribe.Subscriber<U>, U extends Object>
    Set<T>
     
    protected <T extends E>
    void
    findSubscriptions(Object arg0, org.geysermc.event.util.TriConsumer<Class<T>,org.geysermc.event.subscribe.Subscribe,BiConsumer<Object,T>> arg1)
     
    boolean
    fire(@NonNull Object event)
     
    protected <T, B extends org.geysermc.event.subscribe.Subscriber<T>>
    B
    makeSubscription(@NonNull Class<T> eventClass, @NonNull Consumer<T> handler, @NonNull org.geysermc.event.PostOrder postOrder)
     
    protected <H, T, B extends org.geysermc.event.subscribe.Subscriber<T>>
    B
    makeSubscription(@NonNull Class<T> eventClass, @NonNull org.geysermc.event.subscribe.Subscribe subscribe, @NonNull H listener, @NonNull BiConsumer<H,T> handler)
     
    protected <T extends E>
    void
    register(Class<T> arg0, org.geysermc.floodgate.api.event.FloodgateSubscriber<?> arg1)
     
    protected List<org.geysermc.floodgate.api.event.FloodgateSubscriber<?>>
     
    void
    unsubscribe(org.geysermc.floodgate.api.event.FloodgateSubscriber<?> arg0)
     
    protected void
     
    protected void
    unsubscribeMany(Iterable<org.geysermc.floodgate.api.event.FloodgateSubscriber<?>> arg0)
     

    Methods inherited from class org.geysermc.event.bus.impl.EventBusImpl

    register, subscribe, subscribe, subscribers, unregisterAll

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.geysermc.event.bus.BaseBus

    subscribers, unsubscribe

    Methods inherited from interface org.geysermc.event.bus.EventBus

    register, subscribe, subscribe, unregisterAll
  • Constructor Details

    • EventBus

      public EventBus()
  • Method Details

    • fire

      public boolean fire(@NonNull Object event)
      Specified by:
      fire in interface org.geysermc.event.bus.BaseBus<Object,org.geysermc.floodgate.api.event.FloodgateSubscriber<?>>
    • makeSubscription

      protected <H, T, B extends org.geysermc.event.subscribe.Subscriber<T>> B makeSubscription(@NonNull Class<T> eventClass, @NonNull org.geysermc.event.subscribe.Subscribe subscribe, @NonNull H listener, @NonNull BiConsumer<H,T> handler)
      Specified by:
      makeSubscription in class org.geysermc.event.bus.impl.EventBusImpl<Object,org.geysermc.floodgate.api.event.FloodgateSubscriber<?>>
    • makeSubscription

      protected <T, B extends org.geysermc.event.subscribe.Subscriber<T>> B makeSubscription(@NonNull Class<T> eventClass, @NonNull Consumer<T> handler, @NonNull org.geysermc.event.PostOrder postOrder)
      Specified by:
      makeSubscription in class org.geysermc.event.bus.impl.EventBusImpl<Object,org.geysermc.floodgate.api.event.FloodgateSubscriber<?>>
    • register

      protected <T extends E> void register(Class<T> arg0, org.geysermc.floodgate.api.event.FloodgateSubscriber<?> arg1)
    • findSubscriptions

      protected <T extends E> void findSubscriptions(Object arg0, org.geysermc.event.util.TriConsumer<Class<T>,org.geysermc.event.subscribe.Subscribe,BiConsumer<Object,T>> arg1)
    • unsubscribe

      public void unsubscribe(org.geysermc.floodgate.api.event.FloodgateSubscriber<?> arg0)
      Specified by:
      unsubscribe in interface org.geysermc.event.bus.BaseBus<E extends Object,S extends org.geysermc.event.subscribe.Subscriber<? extends E>>
    • unsubscribeMany

      protected void unsubscribeMany(Iterable<org.geysermc.floodgate.api.event.FloodgateSubscriber<?>> arg0)
    • unsubscribeAll

      protected void unsubscribeAll()
    • sortedSubscribers

      protected List<org.geysermc.floodgate.api.event.FloodgateSubscriber<?>> sortedSubscribers(Class<?> arg0)
    • eventSubscribers

      protected <T extends org.geysermc.event.subscribe.Subscriber<U>, U extends Object> Set<T> eventSubscribers(Class<U> arg0)
    • castGenericSet

      protected static <T extends U, U extends Object> Set<T> castGenericSet(Set<U> arg0)