Interface EntityProviderListener<T extends EntityProvider>


  • public interface EntityProviderListener<T extends EntityProvider>
    This allows a developer to be notified whenever a provider is registered, it will also ensure that it calls the listener method for any providers that are already registered when it is first registered if desired
    Usage:
    Just implement this class and use EntityProviderManager#registerNotifier(EntityProviderNotifier) to register it with the system. Whenever an entity provider is registered the run(EntityProvider) method is called. You can limit the calls to your listener using the getPrefixFilter() and getCapabilityFilter().
    Note that you can return a null prefix filter and capability filter but it means you will get called for every registration of every provider. You will want to use the EntityProvider for the generics to receive every capability type.
    Author:
    Aaron Zeckoski (azeckoski @ gmail.com)
    • Method Detail

      • getPrefixFilter

        String getPrefixFilter()
        Returns:
        the prefix to limit the notifications to OR null for any prefix
      • getCapabilityFilter

        Class<T> getCapabilityFilter()
        Returns:
        the capability to limit notifications to OR null for any capability (still will only be called once per provider)