NamingServiceImpl class Reference (original) (raw)

Main Page Packages Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members


Implementation class for the MPS Server Interface defined in ../namingservice.mps. More...

Inheritance diagram for NamingServiceImpl:

Inheritance graph

[legend]

Collaboration diagram for NamingServiceImpl:

Collaboration graph

[legend]

List of all members.

Private Methods
public NamingServiceImpl ()
public String resolve (String name)
public boolean bind (String name, String cname, boolean replace)
public boolean unbind (String name)
public Binding [] enumerate ()
Private Attributes
private Hashtable names = new Hashtable()
Static Private Methods
public void main (String[] args)
public void usage ()

Detailed Description

Implementation class for the MPS Server Interface defined in ../namingservice.mps.

MPS uses an MPS server to locate its own server names!

Note that this class has a main method - it is its own application as well: a standalone MPS name server.

Author(s):

Tony Garnock-Jones <tonyg@kcbbs.gen.nz>

Definition at line 54 of file NamingServiceImpl.java.


Constructor & Destructor Documentation

public NamingServiceImpl::NamingServiceImpl ( ) [inline, private]

Member Function Documentation

public boolean NamingServiceImpl::bind ( String name,
String cname,
boolean replace ) [inline, private]

| | Implement the naming-service name binding function. Parameters: name the object name to use cname the canonical name to use replace whether to replace any potential existing bindings with the same name or not Returns: true if the bind succeeded; false if an existing binding was not replaced Definition at line 143 of file NamingServiceImpl.java.Referenced by main(). | | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |

public Binding[] NamingServiceImpl::enumerate ( ) [inline, private]

| | Get a list of all the name-value pairs in the current running database. Returns: an array of Result structures containing every map in the hashtable Definition at line 177 of file NamingServiceImpl.java. | | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |

public void NamingServiceImpl::main ( Stringargs[] ) [inline, static, private]
public String NamingServiceImpl::resolve ( String name ) [inline, private]

| | Implement the naming-service resolution function. Parameters: name the objectName to look up Returns: the results of the lookup - an address, or the empty-string Definition at line 122 of file NamingServiceImpl.java. | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |

public boolean NamingServiceImpl::unbind ( String name ) [inline, private]

| | Implement the naming-service name unbinding function. Parameters: name the name to remove from this nameserver Returns: true if the name was removed; false if it was not bound in the first place Definition at line 161 of file NamingServiceImpl.java. | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |

public void NamingServiceImpl::usage ( ) [inline, static, private]

Member Data Documentation

private Hashtable NamingServiceImpl::names = new Hashtable() [private]

| | This class uses a naive hashtable-lookup to map objectNames onto resolvedNames (aka canonical names).Definition at line 111 of file NamingServiceImpl.java. | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |


The documentation for this class was generated from the following file:


Generated at Wed Aug 15 01:05:35 2001 for mps-java by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001