Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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.

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

    public 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 `LookupLocator`s 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

    public 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

    public 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

    public 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[])`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004 Sun Microsystems, Inc. All rights reserved