Package org.wildfly.naming.client
Class AbstractContext
java.lang.Object
org.wildfly.naming.client.AbstractContext
- All Implemented Interfaces:
AutoCloseable,Context
- Direct Known Subclasses:
AbstractFederatingContext,HttpRootContext,RelativeContext
An abstract
Context implementation which does not support federation of naming systems (i.e. binding
contexts from other naming systems). Such contexts can use names that do not follow the composite name
syntax constraints, and may perform better.- Author:
- David M. Lloyd
-
Field Summary
Fields inherited from interface javax.naming.Context
APPLET, AUTHORITATIVE, BATCHSIZE, DNS_URL, INITIAL_CONTEXT_FACTORY, LANGUAGE, OBJECT_FACTORIES, PROVIDER_URL, REFERRAL, SECURITY_AUTHENTICATION, SECURITY_CREDENTIALS, SECURITY_PRINCIPAL, SECURITY_PROTOCOL, STATE_FACTORIES, URL_PKG_PREFIXES -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedConstruct a new instance.protectedAbstractContext(FastHashtable<String, Object> environment) Construct a new instance. -
Method Summary
Modifier and TypeMethodDescriptionaddToEnvironment(String propName, Object propVal) voidvoidprotected voidbindNative(Name name, Object obj) composeName(String name, String prefix) composeName(Name name, Name prefix) createSubcontext(String name) createSubcontext(Name name) protected ContextcreateSubcontextNative(Name name) protected NamedecomposeName(CompositeName compositeName) voiddestroySubcontext(String name) voiddestroySubcontext(Name name) protected voiddestroySubcontextNative(Name name) getNameParser(String name) getNameParser(Name name) Get the native name parser for this context.listBindings(String name) listBindings(Name name) protected abstract CloseableNamingEnumeration<Binding>listBindingsNative(Name name) protected abstract CloseableNamingEnumeration<NameClassPair>listNative(Name name) lookupLink(String name) lookupLink(Name name) protected abstract ObjectlookupLinkNative(Name name) protected abstract ObjectlookupNative(Name name) Look up a compound name within this naming system.protected static NamingExceptionnameNotFound(Name name) protected static OperationNotSupportedExceptionprotected static NoPermissionExceptionvoidvoidprotected voidrebindNative(Name name, Object obj) removeFromEnvironment(String propName) voidvoidprotected voidrenameNative(Name oldName, Name newName) voidvoidprotected voidunbindNative(Name name) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.AutoCloseable
closeMethods inherited from interface javax.naming.Context
close, getNameInNamespace
-
Constructor Details
-
AbstractContext
Construct a new instance. The given environment map is used directly; the caller is responsible for creating a copy if a copy is needed.- Parameters:
environment- the environment map to use
-
AbstractContext
protected AbstractContext()Construct a new instance. A new, empty environment map is created for this context.
-
-
Method Details
-
getNativeNameParser
Get the native name parser for this context. The name parser should always yield a compound name; returning a composite name may cause undefined results or infinite loops or recursion. The default implementation returns a name parser forSimpleNameinstances but may be overridden as desired.- Returns:
- the name parser
-
lookup
- Specified by:
lookupin interfaceContext- Throws:
NamingException
-
lookup
- Specified by:
lookupin interfaceContext- Throws:
NamingException
-
lookupNative
Look up a compound name within this naming system. The given name is guaranteed not to be aCompositeName.- Parameters:
name- the (compound) name (notnull)- Returns:
- the binding value
- Throws:
NamingException- if an error occurs
-
lookupLink
- Specified by:
lookupLinkin interfaceContext- Throws:
NamingException
-
lookupLink
- Specified by:
lookupLinkin interfaceContext- Throws:
NamingException
-
lookupLinkNative
- Throws:
NamingException
-
bind
- Specified by:
bindin interfaceContext- Throws:
NamingException
-
bind
- Specified by:
bindin interfaceContext- Throws:
NamingException
-
bindNative
- Throws:
NamingException
-
rebind
- Specified by:
rebindin interfaceContext- Throws:
NamingException
-
rebind
- Specified by:
rebindin interfaceContext- Throws:
NamingException
-
rebindNative
- Throws:
NamingException
-
unbind
- Specified by:
unbindin interfaceContext- Throws:
NamingException
-
unbind
- Specified by:
unbindin interfaceContext- Throws:
NamingException
-
unbindNative
- Throws:
NamingException
-
rename
- Specified by:
renamein interfaceContext- Throws:
NamingException
-
rename
- Specified by:
renamein interfaceContext- Throws:
NamingException
-
renameNative
- Throws:
NamingException
-
list
- Specified by:
listin interfaceContext- Throws:
NamingException
-
list
- Specified by:
listin interfaceContext- Throws:
NamingException
-
listNative
protected abstract CloseableNamingEnumeration<NameClassPair> listNative(Name name) throws NamingException - Throws:
NamingException
-
listBindings
- Specified by:
listBindingsin interfaceContext- Throws:
NamingException
-
listBindings
- Specified by:
listBindingsin interfaceContext- Throws:
NamingException
-
listBindingsNative
protected abstract CloseableNamingEnumeration<Binding> listBindingsNative(Name name) throws NamingException - Throws:
NamingException
-
destroySubcontext
- Specified by:
destroySubcontextin interfaceContext- Throws:
NamingException
-
destroySubcontext
- Specified by:
destroySubcontextin interfaceContext- Throws:
NamingException
-
destroySubcontextNative
- Throws:
NamingException
-
createSubcontext
- Specified by:
createSubcontextin interfaceContext- Throws:
NamingException
-
createSubcontext
- Specified by:
createSubcontextin interfaceContext- Throws:
NamingException
-
createSubcontextNative
- Throws:
NamingException
-
composeName
- Specified by:
composeNamein interfaceContext- Throws:
NamingException
-
composeName
- Specified by:
composeNamein interfaceContext- Throws:
NamingException
-
getNameParser
- Specified by:
getNameParserin interfaceContext- Throws:
NamingException
-
getNameParser
- Specified by:
getNameParserin interfaceContext- Throws:
NamingException
-
decomposeName
- Throws:
NamingException
-
addToEnvironment
- Specified by:
addToEnvironmentin interfaceContext
-
removeFromEnvironment
- Specified by:
removeFromEnvironmentin interfaceContext
-
getEnvironment
- Specified by:
getEnvironmentin interfaceContext- Throws:
NamingException
-
nameNotFound
-
readOnlyContext
-
notSupported
-