uk.ac.man.cs.rainbow.rapa
Class NamingContext

java.lang.Object
  |
  +--uk.ac.man.cs.rainbow.rapa.NamingContext
Direct Known Subclasses:
BasicNamingContext

public abstract class NamingContext
extends Object

General mapping engine for going from process call invokations to the definitions of a process. Forms a linked list of contexts.

See Also:
Call

Inner Class Summary
static class NamingContext.Mapping
          Callable process definition.
 
Field Summary
static NamingContext initial
          A marker to indicate where the end of the chain of naming contexts is reached.
protected  NamingContext parent
           
 
Constructor Summary
NamingContext(NamingContext parent)
           
 
Method Summary
protected abstract  String append(StringBuffer sb, String separator)
          Append each mapping supported by this naming context to the string buffer, preceded by the separator.
abstract  NamingContext.Mapping get(String name, Argument[] parameters)
          Get the definition for the given named process call.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

initial

public static final NamingContext initial
A marker to indicate where the end of the chain of naming contexts is reached.

parent

protected final NamingContext parent
Constructor Detail

NamingContext

public NamingContext(NamingContext parent)
Method Detail

get

public abstract NamingContext.Mapping get(String name,
                                          Argument[] parameters)
Get the definition for the given named process call.
Parameters:
name - What the process definition is called.
parameters - The parameters that will be passed to the process (needed for the correct handling of some Green constructs.)

append

protected abstract String append(StringBuffer sb,
                                 String separator)
Append each mapping supported by this naming context to the string buffer, preceded by the separator.
Parameters:
sb - The string buffer to append to.
separator - A newline except at the very start of the printing of a mapping list, when it is an empty string.
Returns:
The separator to use for the parent naming context.
See Also:
BasicNamingContext.append(StringBuffer,String), toString()

toString

public final String toString()
Overrides:
toString in class Object