Class UpdatesNotifier

    • Constructor Detail

      • UpdatesNotifier

        public UpdatesNotifier​(ThreadFactory threadFactory)
        Creates a new UpdatesNotifier with the given thread factory.
        Parameters:
        threadFactory - the threadFactory to use for the internal executor
    • Method Detail

      • run

        public void run()
        Specified by:
        run in interface Runnable
      • register

        public void register​(String sourceName,
                             Runnable listener)
        Registers a new updates listener.
        Parameters:
        sourceName - the name of the source to watch
        listener - the listener to register
      • unregister

        public void unregister​(String sourceName,
                               Runnable listener)
        Unregisters an updates listener.
        Parameters:
        sourceName - name of the source to watch
        listener - the listener to unregister
      • trigger

        public void trigger​(String sourceName)
        Sets the source that has been updated.
        Parameters:
        sourceName - name of the source to trigger