Interface Specification for Namespace


[Contents] [Prev] [Next]
Table of Contents

Overview

The Namespace interface contains specifications for namespace types and generic namespace traversal.

The namespace is a directed graph structure linking published objects within a distributed objects framework. Nodes in the graph are represented by contexts, and each context can contain any number of name bindings, which are the links to other distributed objects. Names are actually bound to object descriptors, which are string representations of an object's type and an opaque reference. Currently, since the distributed object system being used is ILU, object references are ILU String Binding Handles (SBHs). A descriptor is the minimum information necessary for a client to reconstitute the described surrogate object (e.g. by using ilu.ObjectOfSBH()).

Paths in the namespace are a string of non-empty component names separated by slashes ("/"). Paths do not start with a slash and unlike file names, there are no parent contexts so components such as "." and ".." are not treated specially. A component of a path cannot contain slashes and must be non-empty.

Types

This interface defines the following non-OBJECT types:

String
An alias for ilu.CString
Strings
An alias for SEQUENCE OF String
Descriptor
A RECORD representing a distributed object linked into the namespace. Descriptors have the following fields:
typename
A String containing the type of the distributed object, the format "Interface.Object" (or, in Python, read as: "Module.Class").
reference
A String containing the opaque reference to the object, currently an ILU SBH.

Exceptions

This interface defines the following exceptions:

ResolutionError
Raised when a name lookup fails to resolve to a descriptor.

Binding
Raised when a name cannot be bound to a descriptor.

Context Objects

These objects represent internal nodes which may be non-leaf nodes in the namespace graph.

Lookup1 (component : String) : Descriptor
Return the descriptor for the object bound to the name component in this Context object. Raise a ResolutionError if component is not bound, or if the component is invalid.

List () : Strings
Return a list of the names bound to descriptors in this Context object. The order of the returned strings is not defined.

Bind (name : String, desc : Descriptor)
Bind name to the specified descriptor object desc. Raise BindError if the name is already bound or is invalid.

Rebind (name : String, desc : Descriptor)
Bind name to the specified descriptor object desc. If the name is already bound, it is replaced atomically. Raises BindError if the name is invalid.

Unbind (name : String)
Unbind the name in the current context. Raise BindError if the name is not bound or is invalid.

GetDescriptor()
Return the descriptor for this context.

Table of Contents

[Contents] [Prev] [Next]
Copyright © 1998 by the Corporation for National Research Initiatives.