Class SignalEnvelopeDispatcher

java.lang.Object
me.tamkungz.signals.internal.SignalEnvelopeDispatcher
All Implemented Interfaces:
foo.zaaarf.geb.api.IEventDispatcher<SignalEnvelope>

public final class SignalEnvelopeDispatcher extends Object implements foo.zaaarf.geb.api.IEventDispatcher<SignalEnvelope>
Hands every SignalEnvelope that reaches a GEB bus to the SignalRouters registered on it.

GEB only calls listeners once a dispatcher for the event type is registered on the bus, and drops events without one. Dispatchers are normally generated by GEB's annotation processor and discovered through a service file; this one is written out by hand so that a SignalBus works on any bus it is given, without annotation processing and without depending on which class loader the service file is visible to.

Internal: SignalBus registers it.

  • Field Details

  • Method Details

    • callListeners

      public boolean callListeners(SignalEnvelope event, Map<Class<? extends foo.zaaarf.geb.api.IListener>,Set<foo.zaaarf.geb.api.IListener>> listeners)
      Specified by:
      callListeners in interface foo.zaaarf.geb.api.IEventDispatcher<SignalEnvelope>
    • eventType

      public Class<SignalEnvelope> eventType()
      Specified by:
      eventType in interface foo.zaaarf.geb.api.IEventDispatcher<SignalEnvelope>