Check out the new USENIX Web site. next up previous
Next: AFE Implementations Up: Metis Implementation Previous: ControllerInterface Implementation

DirectoryInterface Implementation

  The DirectoryInterface need only define the following method:

public SearchResult 
  lookUpService(Authobj authobj, 
       String name, String filter, 
       URL[] blacklist, int howmany, 
       String attrlist) 
  throws java.rmi.RemoteException;
The requestService() method of the VEMInterface calls this method to access the LDAP directory. The parameters passed to this method are:
authobj: The authentication object from the workspace used for access control in the LDAP directory.
name: The name of the service being looked for.
filter: A filter composed of attribute/value pairs.
blacklist: A list of service locations that the client specifically does not want returned even if matched.
howmany: A count of matches to be returned.
attrlist: A list of attributes that are to be returned with every match.

The method returns an object containing service locations and attributes. The implementation of the lookUpService() method on the Metis Directory Server is straightforward. The Metis Directory Server acts an LDAP client. It constructs an LDAP query, and submits the query to an LDAP server. If desired, a random subset is chosen from the services returned by the LDAP server and are returned to the client. At the present time, the Metis Directory Server uses an LDAP client API. The use of the Java Naming and Directory Interface (JNDI) [2] is being investigated.

The interface is simple but flexible enough to be used for various purposes. In addition to looking for service names and services with specific attributes, it can also return a list of all services (subject to access control) when used as:

SearchResult s=lookUpService(authobj,
    null, null, null,
    ALL_POSSIBLE, null);
where the null values indicate no filtering and subsetting is to be performed; or, can return the count of all services with the name ``LotusNotes'' when used as:
int i=lookUpService(authobj,
    "LotusNotes", null, null,
    ALL_POSSIBLE, null).getCount();



A. Purakayastha
Mon May 5 15:03:42 EDT 1997