Package net.jini.discovery
Interface DiscoveryLocatorManagement
- All Known Implementing Classes:
LookupDiscoveryManager,LookupLocatorDiscovery,SharedDiscoveryManagement.SharedDiscoveryManager
public interface DiscoveryLocatorManagement
This interface defines methods related to the management of the set of lookup services that are
to be discovered using the unicast discovery protocol; that is, lookup services that are
discovered by way of locator discovery. The methods of this interface define how an entity
retrieves or modifies the set of locators associated with those lookup services.
- Author:
- Sun Microsystems, Inc.
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddLocators(LookupLocator[] locators) Adds a set of locators to the managed set of locators.Returns an array consisting of the elements of the managed set of locators; that is, instances ofLookupLocatorin which each instance corresponds to a specific lookup service to discover.voidremoveLocators(LookupLocator[] locators) Deletes a set of locators from the managed set of locators, and discards any already-discovered lookup service that corresponds to a deleted locator.voidsetLocators(LookupLocator[] locators) Replaces all of the locators in the managed set with locators from a new set, and discards any already-discovered lookup service that corresponds to a locator that is removed from the managed set as a result of an invocation of this method.
-
Method Details
-
getLocators
LookupLocator[] getLocators()Returns an array consisting of the elements of the managed set of locators; that is, instances ofLookupLocatorin which each instance corresponds to a specific lookup service to discover. The returned set will include both the set ofLookupLocators corresponding to lookup services that have already been discovered as well as the set of those that have not yet been discovered. If the managed set of locators is empty, this method will return the empty array. This method returns a new array upon each invocation.- Returns:
LookupLocatorarray consisting of the elements of the managed set of locators- See Also:
-
addLocators
Adds a set of locators to the managed set of locators. Elements in the input set that duplicate (using theLookupLocator.equalsmethod) elements already in the managed set will be ignored. If the empty array is input, the managed set of locators will not change.- Parameters:
locators-LookupLocatorarray consisting of the locators to add to the managed set.- Throws:
NullPointerException- this exception occurs when eithernullis input to thelocatorsparameter, or one or more of the elements of thelocatorsparameter isnull.- See Also:
-
setLocators
Replaces all of the locators in the managed set with locators from a new set, and discards any already-discovered lookup service that corresponds to a locator that is removed from the managed set as a result of an invocation of this method. For any such lookup service that is discarded, a discard notification is sent; and that lookup service will not be eligible for re-discovery (assuming it is not currently eligible for discovery through other means, such as group discovery).If the empty array is input, locator discovery will cease until this method is invoked with an input parameter that is non-
nulland non-empty.- Parameters:
locators-LookupLocatorarray consisting of the locators that will replace the current locators in the managed set.- Throws:
NullPointerException- this exception occurs whennullis input to thelocatorsparameter.- See Also:
-
removeLocators
Deletes a set of locators from the managed set of locators, and discards any already-discovered lookup service that corresponds to a deleted locator. For any lookup service that is discarded as a result of an invocation of this method, a discard notification is sent; and that lookup service will not be eligible for re-discovery (assuming it is not currently eligible for discovery through other means, such as group discovery).If the empty array is input, this method takes no action.
- Parameters:
locators-LookupLocatorarray consisting of the locators that will be removed from the managed set.- Throws:
NullPointerException- this exception occurs whennullis input to thelocatorsparameter.- See Also:
-