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

NamingServiceImpl Class Reference

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

Inheritance diagram for NamingServiceImpl:

Inheritance graph
Collaboration diagram for NamingServiceImpl:

Collaboration graph
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.

Tony Garnock-Jones <>

Definition at line 54 of file

Constructor & Destructor Documentation

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

Definition at line 113 of file

Member Function Documentation

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

Implement the naming-service name binding function.

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
true if the bind succeeded; false if an existing binding was not replaced

Definition at line 143 of file

Referenced by main().

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

Get a list of all the name-value pairs in the current running database.

an array of Result structures containing every map in the hashtable

Definition at line 177 of file

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

Main method for the standalone naming server.

Definition at line 58 of file

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

Implement the naming-service resolution function.

name   the objectName to look up
the results of the lookup - an address, or the empty-string

Definition at line 122 of file

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

Implement the naming-service name unbinding function.

name   the name to remove from this nameserver
true if the name was removed; false if it was not bound in the first place

Definition at line 161 of file

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

Display a friendly application-usage message to stdout.

Definition at line 99 of file

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

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