GigaSpaces XAP 9.0 API

net.jini.discovery
Interface DiscoveryLocatorManagement

All Known Implementing Classes:
LookupDiscoveryManager, LookupLocatorDiscovery

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
 void addLocators(LookupLocator[] locators)
          Adds a set of locators to the managed set of locators.
 LookupLocator[] getLocators()
          Returns an array consisting of the elements of the managed set of locators; that is, instances of LookupLocator in which each instance corresponds to a specific lookup service to discover.
 void removeLocators(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.
 void setLocators(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 Detail

getLocators

LookupLocator[] getLocators()
Returns an array consisting of the elements of the managed set of locators; that is, instances of LookupLocator in which each instance corresponds to a specific lookup service to discover. The returned set will include both the set of LookupLocators 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:
LookupLocator array consisting of the elements of the managed set of locators
See Also:
setLocators(net.jini.core.discovery.LookupLocator[])

addLocators

void addLocators(LookupLocator[] locators)
Adds a set of locators to the managed set of locators. Elements in the input set that duplicate (using the LookupLocator.equals method) 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 - LookupLocator array consisting of the locators to add to the managed set.
Throws:
NullPointerException - this exception occurs when either null is input to the locators parameter, or one or more of the elements of the locators parameter is null.
See Also:
removeLocators(net.jini.core.discovery.LookupLocator[])

setLocators

void setLocators(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. 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-null and non-empty.

Parameters:
locators - LookupLocator array consisting of the locators that will replace the current locators in the managed set.
Throws:
NullPointerException - this exception occurs when null is input to the locators parameter.
See Also:
getLocators()

removeLocators

void removeLocators(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. 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 - LookupLocator array consisting of the locators that will be removed from the managed set.
Throws:
NullPointerException - this exception occurs when null is input to the locators parameter.
See Also:
addLocators(net.jini.core.discovery.LookupLocator[])

GigaSpaces XAP 9.0 API

Copyright © GigaSpaces.