Interface ProviderChangeListener<E>

Type Parameters:
E - type of the element from the provider
All Known Implementing Classes:
AbstractLinkRegistry, AbstractRegistry, ItemChannelLinkRegistry

@NonNullByDefault public interface ProviderChangeListener<@NonNull E>
ProviderChangeListener can be added to Provider services, to listen for changes. The AbstractRegistry implements a ProviderChangeListener and subscribes itself to every added Provider.
Author:
Dennis Nobel - Initial contribution
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    added(Provider<@NonNull E> provider, @NonNull E element)
    Notifies the listener that a single element has been added.
    void
    removed(Provider<@NonNull E> provider, @NonNull E element)
    Notifies the listener that a single element has been removed.
    void
    updated(Provider<@NonNull E> provider, @NonNull E oldelement, @NonNull E element)
    Notifies the listener that a single element has been updated.
  • Method Details

    • added

      void added(Provider<@NonNull E> provider, @NonNull E element)
      Notifies the listener that a single element has been added.
      Parameters:
      provider - the provider that provides the element
      element - the element that has been added
    • removed

      void removed(Provider<@NonNull E> provider, @NonNull E element)
      Notifies the listener that a single element has been removed.
      Parameters:
      provider - the provider that provides the element
      element - the element that has been removed
    • updated

      void updated(Provider<@NonNull E> provider, @NonNull E oldelement, @NonNull E element)
      Notifies the listener that a single element has been updated.
      Parameters:
      provider - the provider that provides the element
      element - the element that has been updated