Class DefaultEventSinkRegistry

  • All Implemented Interfaces:
    EventSinkRegistry

    public class DefaultEventSinkRegistry
    extends java.lang.Object
    implements EventSinkRegistry
    Base implementation of event sink registry.
    • Method Summary

      All Methods Instance Methods Concrete 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DefaultEventSinkRegistry

        public DefaultEventSinkRegistry()
    • Method Detail

      • addSink

        public <E extends Event> void addSink​(java.lang.Class<E> eventClass,
                                              EventSink<E> sink)
        Description copied from interface: EventSinkRegistry
        Adds the specified sink for the given event class.
        Specified by:
        addSink in interface EventSinkRegistry
        Type Parameters:
        E - type of event
        Parameters:
        eventClass - event class
        sink - event sink
      • removeSink

        public <E extends Event> void removeSink​(java.lang.Class<E> eventClass)
        Description copied from interface: EventSinkRegistry
        Removes the sink associated with the given event class.
        Specified by:
        removeSink in interface EventSinkRegistry
        Type Parameters:
        E - type of event
        Parameters:
        eventClass - event class
      • getSink

        public <E extends EventEventSink<E> getSink​(java.lang.Class<E> eventClass)
        Description copied from interface: EventSinkRegistry
        Returns the event sink associated with the specified event class.
        Specified by:
        getSink in interface EventSinkRegistry
        Type Parameters:
        E - type of event
        Parameters:
        eventClass - event class
        Returns:
        event sink or null if none found
      • getSinks

        public java.util.Set<java.lang.Class<? extends Event>> getSinks()
        Description copied from interface: EventSinkRegistry
        Returns the set of all event classes for which sinks are presently registered.
        Specified by:
        getSinks in interface EventSinkRegistry
        Returns:
        set of event classes