public interface ServiceLocatorListener
ServiceLocatorFactory
in order to listen on service locators
coming and going. This listener will only be notified about named ServiceLocators.
ServiceLocators that are created with a generated name are not tracked by the
system. Implementations of this interface must be able to be stored in a HashMapModifier and Type | Method and Description |
---|---|
void |
initialize(Set<ServiceLocator> initialLocators)
This method returns the complete list of named service
locators at the time that this listener is registered.
|
void |
listenerAdded(ServiceLocator added)
This method is called whenever a named ServiceLocator has been
added to the set of ServiceLocators
|
void |
listenerDestroyed(ServiceLocator destroyed)
This method is called whenever a named ServiceLocator will be
removed from the set of ServiceLocators
|
void initialize(Set<ServiceLocator> initialLocators)
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
initialLocators
- The set of locators available when
the listener is registeredvoid listenerAdded(ServiceLocator added)
Any exceptions thrown from this method will be logged and ignored
added
- The non-null ServiceLocator that is to be addedvoid listenerDestroyed(ServiceLocator destroyed)
Any exceptions thrown from this method will be logged and ignored
destroyed
- The non-null ServiceLocator that is to be destroyedCopyright © 2009-2016 Oracle Corporation. All Rights Reserved.