APIdia Launch Partner
Top Description Fields Constructors Methods
com.sun.jndi.toolkit.ctx

public abstract Class AtomicContext

extends ComponentContext
Class Inheritance
Known Direct Subclasses
com.sun.jndi.toolkit.ctx.PartialCompositeDirContext
Imports
javax.naming.*

Clients: deal only with names for its own naming service and deals with single contexts that can be built up into hierarchical naming systems. Direct subclasses of AtomicContext must provide implementations for the abstract a_ Context methods, and c_parseComponent(). If the subclass implements the notion of implicit nns, it must override the a_*_nns Context methods as well.
Author
Rosanna Lee

Field Summary

Modifier and TypeField and Description
private static int
Inherited from com.sun.jndi.toolkit.ctx.ComponentContext:
TERMINAL_COMPONENTTERMINAL_NNS_COMPONENTUSE_CONTINUATION

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
protected abstract void
a_bind(String name, Object obj, Continuation cont)

protected void
protected abstract Context
protected Context
protected abstract void
protected void
protected abstract NameParser
protected NameParser
protected abstract NamingEnumeration<NameClassPair>
protected NamingEnumeration<NameClassPair>
protected abstract NamingEnumeration<Binding>
protected NamingEnumeration<Binding>
protected abstract Object
protected Object
protected void
a_processJunction_nns(String name, Continuation cont)

This function is used when implementing a naming system that supports junctions.

protected void
a_processJunction_nns(Continuation cont)

This function is used when implementing a naming system that supports junctions.

protected abstract void
protected void
protected abstract void
a_rename(String oldname, Name newname, Continuation cont)

protected void
a_rename_nns(String oldname, Name newname, Continuation cont)

protected Object
a_resolveIntermediate_nns(String name, Continuation cont)

Resolves the nns for 'name' when the named context is acting as an intermediate context.

protected abstract void
protected void
protected void
protected void
protected Context
protected Context
protected void
protected void
protected NameParser
protected NameParser
protected NamingEnumeration<NameClassPair>
protected NamingEnumeration<NameClassPair>
protected NamingEnumeration<Binding>
protected NamingEnumeration<Binding>
protected Object
protected Object
protected abstract StringHeadTail
c_parseComponent(String inputName, Continuation cont)

Parse 'inputName' into two parts: head: the first component in this name tail: the rest of the unused name.

protected void
protected void
protected void
protected void
protected Object
c_resolveIntermediate_nns(Name name, Continuation cont)

Overrides com.sun.jndi.toolkit.ctx.ComponentContext.c_resolveIntermediate_nns.

Resolves the nns for 'name' when the named context is acting as an intermediate context.

protected void
protected void
protected boolean
protected boolean
resolve_to_context(Name name, Continuation cont)

Resolve to context named by 'name'.

protected void
resolve_to_nns_and_continue(Name name, Continuation cont)

Resolves to nns associated with 'name' and set Continuation to the result.

protected boolean
resolve_to_penultimate_context(Name name, Continuation cont)

Resolves to penultimate context named by 'name'.

protected boolean
resolve_to_penultimate_context_nns(Name name, Continuation cont)

This function is similar to resolve_to_penultimate_context() except it should only be called by the nns() functions.

Inherited from com.sun.jndi.toolkit.ctx.ComponentContext:
c_processJunction_nnscheckAndAdjustRemainingNameisAllEmptyp_bindp_createSubcontextp_destroySubcontextp_getNameParserp_listp_listBindingsp_lookupp_lookupLinkp_parseComponentp_rebindp_renamep_resolveIntermediatep_resolveToClassp_unbind

Field Detail

debugback to summary
private static int debug

Hides com.sun.jndi.toolkit.ctx.ComponentContext.debug.

Constructor Detail

AtomicContextback to summary
protected AtomicContext()

Method Detail

a_bindback to summary
protected abstract void a_bind(String name, Object obj, Continuation cont) throws NamingException
a_bind_nnsback to summary
protected void a_bind_nns(String name, Object obj, Continuation cont) throws NamingException
a_createSubcontextback to summary
protected abstract Context a_createSubcontext(String name, Continuation cont) throws NamingException
a_createSubcontext_nnsback to summary
protected Context a_createSubcontext_nns(String name, Continuation cont) throws NamingException
a_destroySubcontextback to summary
protected abstract void a_destroySubcontext(String name, Continuation cont) throws NamingException
a_destroySubcontext_nnsback to summary
protected void a_destroySubcontext_nns(String name, Continuation cont) throws NamingException
a_getNameParserback to summary
protected abstract NameParser a_getNameParser(Continuation cont) throws NamingException
a_getNameParser_nnsback to summary
protected NameParser a_getNameParser_nns(Continuation cont) throws NamingException
a_listback to summary
protected abstract NamingEnumeration<NameClassPair> a_list(Continuation cont) throws NamingException
a_list_nnsback to summary
protected NamingEnumeration<NameClassPair> a_list_nns(Continuation cont) throws NamingException
a_listBindingsback to summary
protected abstract NamingEnumeration<Binding> a_listBindings(Continuation cont) throws NamingException
a_listBindings_nnsback to summary
protected NamingEnumeration<Binding> a_listBindings_nns(Continuation cont) throws NamingException
a_lookupback to summary
protected abstract Object a_lookup(String name, Continuation cont) throws NamingException
a_lookup_nnsback to summary
protected Object a_lookup_nns(String name, Continuation cont) throws NamingException
a_processJunction_nnsback to summary
protected void a_processJunction_nns(String name, Continuation cont) throws NamingException

This function is used when implementing a naming system that supports junctions. For example, when the a_bind_nns(name, newobj) method is invoked, that means the caller is attempting to bind the object 'newobj' to the nns of 'name'. For context that supports junctions, 'name' names a junction and is pointing to the root of another naming system, which in turn might have an nns. This means that a_bind_nns() should first resolve 'name' and attempt to continue the operation in the context named by 'name'. (i.e. bind to the nns of the context named by 'name'). If name is already empty, then throw NameNotFoundException because this context by default does not have any nns.

a_processJunction_nnsback to summary
protected void a_processJunction_nns(Continuation cont) throws NamingException

This function is used when implementing a naming system that supports junctions. For example, when the a_list_nns(newobj) method is invoked, that means the caller is attempting to list the the nns context of this context. For a context that supports junctions, it by default does not have any nns. Consequently, a NameNotFoundException is thrown.

a_rebindback to summary
protected abstract void a_rebind(String name, Object obj, Continuation cont) throws NamingException
a_rebind_nnsback to summary
protected void a_rebind_nns(String name, Object obj, Continuation cont) throws NamingException
a_renameback to summary
protected abstract void a_rename(String oldname, Name newname, Continuation cont) throws NamingException
a_rename_nnsback to summary
protected void a_rename_nns(String oldname, Name newname, Continuation cont) throws NamingException
a_resolveIntermediate_nnsback to summary
protected Object a_resolveIntermediate_nns(String name, Continuation cont) throws NamingException

Resolves the nns for 'name' when the named context is acting as an intermediate context. For a system that supports junctions, this would be equivalent to a_lookup(name, cont); because for junctions, an intermediate slash simply signifies a syntactic separator. For a system that supports implicit nns, this would be equivalent to a_lookup_nns(name, cont); because for implicit nns, a slash always signifies the implicit nns, regardless of whether it is intermediate or trailing. By default this method supports junctions, and also allows for an implicit nns to be dynamically determined through the use of the "nns" reference (see a_processJunction_nns()). Contexts that implement implicit nns directly should provide an appropriate override.

a_unbindback to summary
protected abstract void a_unbind(String name, Continuation cont) throws NamingException
a_unbind_nnsback to summary
protected void a_unbind_nns(String name, Continuation cont) throws NamingException
c_bindback to summary
protected void c_bind(Name name, Object obj, Continuation cont) throws NamingException

Implements abstract com.sun.jndi.toolkit.ctx.ComponentContext.c_bind.

c_bind_nnsback to summary
protected void c_bind_nns(Name name, Object obj, Continuation cont) throws NamingException

Overrides com.sun.jndi.toolkit.ctx.ComponentContext.c_bind_nns.

c_createSubcontextback to summary
protected Context c_createSubcontext(Name name, Continuation cont) throws NamingException

Implements abstract com.sun.jndi.toolkit.ctx.ComponentContext.c_createSubcontext.

c_createSubcontext_nnsback to summary
protected Context c_createSubcontext_nns(Name name, Continuation cont) throws NamingException

Overrides com.sun.jndi.toolkit.ctx.ComponentContext.c_createSubcontext_nns.

c_destroySubcontextback to summary
protected void c_destroySubcontext(Name name, Continuation cont) throws NamingException

Implements abstract com.sun.jndi.toolkit.ctx.ComponentContext.c_destroySubcontext.

c_destroySubcontext_nnsback to summary
protected void c_destroySubcontext_nns(Name name, Continuation cont) throws NamingException

Overrides com.sun.jndi.toolkit.ctx.ComponentContext.c_destroySubcontext_nns.

c_getNameParserback to summary
protected NameParser c_getNameParser(Name name, Continuation cont) throws NamingException

Implements abstract com.sun.jndi.toolkit.ctx.ComponentContext.c_getNameParser.

c_getNameParser_nnsback to summary
protected NameParser c_getNameParser_nns(Name name, Continuation cont) throws NamingException

Overrides com.sun.jndi.toolkit.ctx.ComponentContext.c_getNameParser_nns.

c_listback to summary
protected NamingEnumeration<NameClassPair> c_list(Name name, Continuation cont) throws NamingException

Implements abstract com.sun.jndi.toolkit.ctx.ComponentContext.c_list.

c_list_nnsback to summary
protected NamingEnumeration<NameClassPair> c_list_nns(Name name, Continuation cont) throws NamingException

Overrides com.sun.jndi.toolkit.ctx.ComponentContext.c_list_nns.

c_listBindingsback to summary
protected NamingEnumeration<Binding> c_listBindings(Name name, Continuation cont) throws NamingException

Implements abstract com.sun.jndi.toolkit.ctx.ComponentContext.c_listBindings.

c_listBindings_nnsback to summary
protected NamingEnumeration<Binding> c_listBindings_nns(Name name, Continuation cont) throws NamingException

Overrides com.sun.jndi.toolkit.ctx.ComponentContext.c_listBindings_nns.

c_lookupback to summary
protected Object c_lookup(Name name, Continuation cont) throws NamingException

Implements abstract com.sun.jndi.toolkit.ctx.ComponentContext.c_lookup.

c_lookup_nnsback to summary
protected Object c_lookup_nns(Name name, Continuation cont) throws NamingException

Overrides com.sun.jndi.toolkit.ctx.ComponentContext.c_lookup_nns.

c_parseComponentback to summary
protected abstract StringHeadTail c_parseComponent(String inputName, Continuation cont) throws NamingException

Parse 'inputName' into two parts: head: the first component in this name tail: the rest of the unused name. Subclasses should provide an implementation for this method which parses inputName using its own name syntax.

c_rebindback to summary
protected void c_rebind(Name name, Object obj, Continuation cont) throws NamingException

Implements abstract com.sun.jndi.toolkit.ctx.ComponentContext.c_rebind.

c_rebind_nnsback to summary
protected void c_rebind_nns(Name name, Object obj, Continuation cont) throws NamingException

Overrides com.sun.jndi.toolkit.ctx.ComponentContext.c_rebind_nns.

c_renameback to summary
protected void c_rename(Name oldname, Name newname, Continuation cont) throws NamingException

Implements abstract com.sun.jndi.toolkit.ctx.ComponentContext.c_rename.

c_rename_nnsback to summary
protected void c_rename_nns(Name oldname, Name newname, Continuation cont) throws NamingException

Overrides com.sun.jndi.toolkit.ctx.ComponentContext.c_rename_nns.

c_resolveIntermediate_nnsback to summary
protected Object c_resolveIntermediate_nns(Name name, Continuation cont) throws NamingException

Overrides com.sun.jndi.toolkit.ctx.ComponentContext.c_resolveIntermediate_nns.

Doc from com.sun.jndi.toolkit.ctx.ComponentContext.c_resolveIntermediate_nns.

Resolves the nns for 'name' when the named context is acting as an intermediate context. For a system that supports only junctions, this would be equivalent to c_lookup(name, cont); because for junctions, an intermediate slash simply signifies a syntactic separator. For a system that supports only implicit nns, this would be equivalent to c_lookup_nns(name, cont); because for implicit nns, a slash always signifies the implicit nns, regardless of whether it is intermediate or trailing. By default this method supports junctions, and also allows for an implicit nns to be dynamically determined through the use of the "nns" reference (see c_processJunction_nns()). Contexts that implement implicit nns directly should provide an appropriate override. A junction, by definition, is a binding of a name in one namespace to an object in another. The default implementation of this method detects the crossover into another namespace using the following heuristic: there is a junction when "name" resolves to a context that is not an instance of this.getClass(). Contexts supporting junctions for which this heuristic is inappropriate should override this method.

c_unbindback to summary
protected void c_unbind(Name name, Continuation cont) throws NamingException

Implements abstract com.sun.jndi.toolkit.ctx.ComponentContext.c_unbind.

c_unbind_nnsback to summary
protected void c_unbind_nns(Name name, Continuation cont) throws NamingException

Overrides com.sun.jndi.toolkit.ctx.ComponentContext.c_unbind_nns.

isEmptyback to summary
protected boolean isEmpty(String name)
resolve_to_contextback to summary
protected boolean resolve_to_context(Name name, Continuation cont) throws NamingException

Resolve to context named by 'name'. Returns true if at named context (i.e. 'name' is empty name). Returns false otherwise, and sets Continuation on parts of 'name' not yet resolved.

resolve_to_nns_and_continueback to summary
protected void resolve_to_nns_and_continue(Name name, Continuation cont) throws NamingException

Resolves to nns associated with 'name' and set Continuation to the result.

resolve_to_penultimate_contextback to summary
protected boolean resolve_to_penultimate_context(Name name, Continuation cont) throws NamingException

Resolves to penultimate context named by 'name'. Returns true if penultimate context has been reached (i.e. name only has one atomic component left). Returns false otherwise, and sets Continuation to parts of name not yet resolved.

resolve_to_penultimate_context_nnsback to summary
protected boolean resolve_to_penultimate_context_nns(Name name, Continuation cont) throws NamingException

This function is similar to resolve_to_penultimate_context() except it should only be called by the nns() functions. This function fixes any exception or continuations so that it will have the proper nns name.