Interface DiscoveryAdmin

All Known Subinterfaces:
Registrar
All Known Implementing Classes:
GigaRegistrar

public interface DiscoveryAdmin
Methods for controlling which groups a lookup service is a member of, and for controlling which TCP port a lookup service uses for its lookup locator. Lookup services that implement the Administrable interface should return an admin object that implements this interface.
Author:
Sun Microsystems, Inc.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Adds the given set of names to the set whose elements are the names of the groups in which the lookup service is currently a member.
    Returns an array consisting of the names of the groups in which the lookup service is a member.
    int
    Returns the port number on which the lookup service listens for unicast discovery queries.
    void
    Deletes the elements of the given set of names from the set whose elements are the names of the groups in which the lookup service is currently a member.
    void
    Replaces the set whose elements are the names of the groups in which the lookup service is currently a member with the given set of group names.
    void
    setUnicastPort(int port)
    Changes the number of the port on which the lookup service is currently listening for unicast discovery queries to the given port number.
  • Method Details

    • getMemberGroups

      String[] getMemberGroups() throws RemoteException
      Returns an array consisting of the names of the groups in which the lookup service is a member. If the lookup service currently belongs to no groups, this method will return the empty array.
      Returns:
      String array consisting of the names of the groups in which the lookup service is a member
      Throws:
      RemoteException - typically, this exception occurs when there is a communication failure between the client and the server.
    • addMemberGroups

      void addMemberGroups(String[] groups) throws RemoteException
      Adds the given set of names to the set whose elements are the names of the groups in which the lookup service is currently a member. Elements in the input set that duplicate names of groups in which the lookup service is already a member will be ignored. If the empty array (NO_GROUPS) is input, this method takes no action.
      Parameters:
      groups - String array consisting of the names of the new, additional groups in which the lookup service is to be a member.
      Throws:
      RemoteException - typically, this exception occurs when there is a communication failure between the client and the server.
      NullPointerException - this exception occurs when either null is input to the groups parameter, or one or more of the elements of the groups parameter is null.
    • removeMemberGroups

      void removeMemberGroups(String[] groups) throws RemoteException
      Deletes the elements of the given set of names from the set whose elements are the names of the groups in which the lookup service is currently a member. Any element in the input set that is not a name of a group in which the lookup service is currently a member will be ignored. If the empty array (NO_GROUPS) is input, this method takes no action.
      Parameters:
      groups - String array consisting of the names to remove from the set whose elements are the names of the groups in which the lookup service is currently a member.
      Throws:
      RemoteException - typically, this exception occurs when there is a communication failure between the client and the server.
      NullPointerException - this exception occurs when either null is input to the groups parameter, or one or more of the elements of the groups parameter is null.
    • setMemberGroups

      void setMemberGroups(String[] groups) throws RemoteException
      Replaces the set whose elements are the names of the groups in which the lookup service is currently a member with the given set of group names. Elements in the input set that duplicate other elements in the input set will be ignored. If the empty array (NO_GROUPS) is input, then the lookup service will be a member of no groups.
      Parameters:
      groups - String array consisting of the names of the new groups in which the lookup service is to be a member.
      Throws:
      RemoteException - typically, this exception occurs when there is a communication failure between the client and the server.
      NullPointerException - this exception occurs when either null is input to the groups parameter, or one or more of the elements of the groups parameter is null.
    • getUnicastPort

      int getUnicastPort() throws RemoteException
      Returns the port number on which the lookup service listens for unicast discovery queries.
      Returns:
      an int representing the port number on which the lookup service listens for unicast discovery queries.
      Throws:
      RemoteException - typically, this exception occurs when there is a communication failure between the client and the server.
    • setUnicastPort

      void setUnicastPort(int port) throws IOException, RemoteException
      Changes the number of the port on which the lookup service is currently listening for unicast discovery queries to the given port number. If a value of zero is input, then the lookup service will first try to listen on the standard unicast discovery port, but if that fails, the lookup service will listen on an arbitrary port.
      Parameters:
      port - int representing the new port number on which the lookup service should listen for unicast discovery queries.
      Throws:
      IOException - because an invocation of this method will result in the re-initiation of the unicast discovery process, which can throw an IOException when socket allocation occurs.
      RemoteException - typically, this exception occurs when there is a communication failure between the client and the server.