Interface EventSinkRegistry

  • All Known Subinterfaces:
    EventDeliveryService
    All Known Implementing Classes:
    DefaultEventSinkRegistry

    public interface EventSinkRegistry
    Abstraction of an event sink registry capable of tracking sinks based on their event class.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      <E extends Event>
      void
      addSink​(java.lang.Class<E> eventClass, EventSink<E> sink)
      Adds the specified sink for the given event class.
      <E extends Event>
      EventSink<E>
      getSink​(java.lang.Class<E> eventClass)
      Returns the event sink associated with the specified event class.
      java.util.Set<java.lang.Class<? extends Event>> getSinks()
      Returns the set of all event classes for which sinks are presently registered.
      <E extends Event>
      void
      removeSink​(java.lang.Class<E> eventClass)
      Removes the sink associated with the given event class.
    • Method Detail

      • addSink

        <E extends Event> void addSink​(java.lang.Class<E> eventClass,
                                       EventSink<E> sink)
        Adds the specified sink for the given event class.
        Type Parameters:
        E - type of event
        Parameters:
        eventClass - event class
        sink - event sink
      • removeSink

        <E extends Event> void removeSink​(java.lang.Class<E> eventClass)
        Removes the sink associated with the given event class.
        Type Parameters:
        E - type of event
        Parameters:
        eventClass - event class
      • getSink

        <E extends EventEventSink<E> getSink​(java.lang.Class<E> eventClass)
        Returns the event sink associated with the specified event class.
        Type Parameters:
        E - type of event
        Parameters:
        eventClass - event class
        Returns:
        event sink or null if none found
      • getSinks

        java.util.Set<java.lang.Class<? extends Event>> getSinks()
        Returns the set of all event classes for which sinks are presently registered.
        Returns:
        set of event classes