Interface ServiceLocatorListener


  • public interface ServiceLocatorListener
    This is added to the ServiceLocatorFactory in order to listen on service locators coming and going. Implementations of this interface must be able to be stored in a HashMap
    Author:
    jwells
    • Method Detail

      • initialize

        void initialize​(Set<ServiceLocator> initialLocators)
        This method returns the complete list of named service locators at the time that this listener is registered. The list may be empty. This method will NOT pass any unnamed ServiceLocators, as they are not tracked by the system

        Any exceptions thrown from this method will be logged and ignored. If an exception is thrown from this method then this listener will NOT be added to the set of listeners notified by the system

        Parameters:
        initialLocators - The set of named locators available when the listener is registered
      • locatorAdded

        void locatorAdded​(ServiceLocator added)
        This method is called whenever a ServiceLocator has been added to the set of ServiceLocators. This method WILL be passed unnamed ServiceLocators when they are added

        Any exceptions thrown from this method will be logged and ignored

        Parameters:
        added - The non-null ServiceLocator that is to be added
      • locatorDestroyed

        void locatorDestroyed​(ServiceLocator destroyed)
        This method is called whenever a ServiceLocator will be removed from the set of ServiceLocators. This method WILL be passed unnamed ServiceLocators when they are destroyed

        Any exceptions thrown from this method will be logged and ignored

        Parameters:
        destroyed - The non-null ServiceLocator that is to be destroyed