solar.service.directory
Interface Directory

All Known Implementing Classes:
FlatDirectory

public interface Directory

Interface for directory containing advertisements.

Version:
$Id: Directory.java,v 1.3 2003/09/25 05:29:58 glchen Exp $
Author:
Guanling Chen

Method Summary
 void addListener(Name pattern, DirectoryListener listener)
          Add a directory observer for the specified pattern.
 NameRecord advertise(Name name, NameRecord rec)
          Advertise a name to the name space.
 java.util.List lookup(Name pattern)
          Return a list of advertisement whose name matches the pattern.
 void removeListener(Name pattern, DirectoryListener listener)
          Remove a directory observer for the specified pattern.
 NameRecord unadvertise(Name name, NameRecord rec)
          Unadvertise a name from the name space.
 NameRecord update(Name oldname, NameRecord oldrec, Name newname, NameRecord newrec)
          Update a name advertisement in the name space.
 

Method Detail

addListener

public void addListener(Name pattern,
                        DirectoryListener listener)
Add a directory observer for the specified pattern.


removeListener

public void removeListener(Name pattern,
                           DirectoryListener listener)
Remove a directory observer for the specified pattern.


lookup

public java.util.List lookup(Name pattern)
Return a list of advertisement whose name matches the pattern.


advertise

public NameRecord advertise(Name name,
                            NameRecord rec)
Advertise a name to the name space.

Returns:
previous record if there is any.

unadvertise

public NameRecord unadvertise(Name name,
                              NameRecord rec)
Unadvertise a name from the name space.

Returns:
previous record if there is any.

update

public NameRecord update(Name oldname,
                         NameRecord oldrec,
                         Name newname,
                         NameRecord newrec)
Update a name advertisement in the name space.

Returns:
previous record if there is any.