Class LookupDiscovery

java.lang.Object
net.jini.discovery.LookupDiscovery
All Implemented Interfaces:
DiscoveryGroupManagement, DiscoveryManagement

public class LookupDiscovery extends Object implements DiscoveryManagement, DiscoveryGroupManagement
This class is a helper utility class that encapsulates the functionality required of an entity that wishes to employ multicast discovery to find lookup services located within the entity's "multicast radius" (roughly, the number of hops beyond which neither the multicast requests from the entity, nor the multicast announcements from the lookup service, will propagate). This class helps make the process of acquiring references to lookup services - based on no information other than lookup service group membership - much simpler for both services and clients.
Author:
Sun Microsystems, Inc.
See Also:
  • Constructor Details

    • LookupDiscovery

      public LookupDiscovery(String[] groups) throws IOException
      Construct a new lookup discovery object, set to discover the given set of groups. The set is represented as an array of strings. This array may be empty, which is taken as the empty set, and discovery is not performed. The reference passed in may be null, which is taken as no set, and in which case discovery of all reachable lookup services is performed. Otherwise, the array contains the names of groups to discover. The caller must have DiscoveryPermission for each group (or for all groups, if the array is null).
      Parameters:
      groups - the set of group names to discover (null for no set, empty for no discovery)
      Throws:
      NullPointerException - input array contains at least one null element
      IOException - an exception occurred in starting discovery
      See Also:
    • LookupDiscovery

      public LookupDiscovery(String[] groups, Configuration config) throws IOException, ConfigurationException
      Constructs a new lookup discovery object, set to discover the given set of groups, and having the given Configuration.

      The set of groups to discover is represented as an array of strings. This array may be empty, which is taken as the empty set, and discovery is not performed. The reference passed in may be null, which is taken as no set, and in which case discovery of all reachable lookup services is performed. Otherwise, the array contains the names of groups to discover. The caller must have DiscoveryPermission for each group (or for all groups, if the array is null).

      Parameters:
      groups - the set of group names to discover (null for no set, empty for no discovery)
      config - an instance of Configuration, used to obtain the objects needed to configure the current instance of this class
      Throws:
      NullPointerException - input array contains at least one null element or null is input for the configuration
      IOException - an exception occurred in starting discovery
      ConfigurationException - indicates an exception occurred while retrieving an item from the given Configuration
      See Also:
  • Method Details