Class NamingContextImpl

  • All Implemented Interfaces:
    NamingContextDataStore, InvokeHandler, NamingContextExtOperations, NamingContextOperations
    Direct Known Subclasses:
    TransientNamingContext

    public abstract class NamingContextImpl
    extends NamingContextExtPOA
    implements NamingContextDataStore
    Class NamingContextImpl implements the org.omg.CosNaming::NamingContext interface, but does not implement the methods associated with maintaining the "table" of current bindings in a NamingContext. Instead, this implementation assumes that the derived implementation implements the NamingContextDataStore interface, which has the necessary methods. This allows multiple NamingContext implementations that differ in storage of the bindings, as well as implementations of interfaces derived from CosNaming::NamingContext that still reuses the implementation.

    The operations bind(), rebind(), bind_context() and rebind_context() are all really implemented by doBind(). resolve() is really implemented by doResolve(), unbind() by doUnbind(). list(), new_context() and destroy() uses the NamingContextDataStore interface directly. All the doX() methods are public static. They synchronize on the NamingContextDataStore object.

    An implementation a NamingContext must extend this class and implement the NamingContextDataStore interface with the operations: Bind(), Resolve(), Unbind(), List(), NewContext() and Destroy(). Calls to these methods are synchronized; these methods should therefore not be synchronized.