Class ListenerList

    • Constructor Detail

      • ListenerList

        public ListenerList()
    • Method Detail

      • addIndexChangedListener

        public ListenerHandle addIndexChangedListener​(IndexChangedListener listener)
        Register an IndexChangedListener.
        Parameters:
        listener - the listener implementation.
        Returns:
        handle to later remove the listener.
      • addRefsChangedListener

        public ListenerHandle addRefsChangedListener​(RefsChangedListener listener)
        Register a RefsChangedListener.
        Parameters:
        listener - the listener implementation.
        Returns:
        handle to later remove the listener.
      • addConfigChangedListener

        public ListenerHandle addConfigChangedListener​(ConfigChangedListener listener)
        Register a ConfigChangedListener.
        Parameters:
        listener - the listener implementation.
        Returns:
        handle to later remove the listener.
      • addListener

        public <T extends RepositoryListenerListenerHandle addListener​(Class<T> type,
                                                                         T listener)
        Add a listener to the list.
        Parameters:
        type - type of listener being registered.
        listener - the listener instance.
        Returns:
        a handle to later remove the registration, if desired.
      • dispatch

        public void dispatch​(RepositoryEvent event)
        Dispatch an event to all interested listeners.

        Listeners are selected by the type of listener the event delivers to.

        Parameters:
        event - the event to deliver.