Class DelegatingObservationDispatcher


  • public class DelegatingObservationDispatcher
    extends Object
    This Class implements an observation dispatcher, that delegates events to a set of underlying dispatchers.
    • Constructor Detail

      • DelegatingObservationDispatcher

        public DelegatingObservationDispatcher()
    • Method Detail

      • addDispatcher

        public void addDispatcher​(ObservationDispatcher dispatcher)
        Adds a new observation dispatcher to the set of dispatchers
        Parameters:
        dispatcher - observation dispatcher
      • removeDispatcher

        public void removeDispatcher​(ObservationDispatcher dispatcher)
        Removes a observation dispatcher from the set of dispatchers
        Parameters:
        dispatcher - observation dispatcher
      • createEventStateCollection

        public EventStateCollection createEventStateCollection​(SessionImpl session,
                                                               Path pathPrefix)
        Creates an EventStateCollection tied to the session given as argument.
        Parameters:
        session - event source
        pathPrefix - event path prefix
        Returns:
        new EventStateCollection instance
      • dispatch

        public void dispatch​(List<EventState> eventList,
                             SessionImpl session,
                             Path pathPrefix,
                             String userData)
        Dispatchers a list of events to all registered dispatchers. A new EventStateCollection is created for every dispatcher, fille with the given event list and then dispatched.
        Parameters:
        eventList - list of events
        session - current session
        pathPrefix - event path prefix
        userData - the user data