Package org.wildfly.naming.client.store
Class RelativeContext
- java.lang.Object
-
- org.wildfly.naming.client.AbstractContext
-
- org.wildfly.naming.client.store.RelativeContext
-
- All Implemented Interfaces:
AutoCloseable,Context
public class RelativeContext extends AbstractContext
A context which is a relative subcontext of a root context.- 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
Constructors Constructor Description RelativeContext(FastHashtable<String,Object> environment, AbstractContext rootContext, SimpleName prefix)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidbindNative(Name name, Object obj)voidclose()protected ContextcreateSubcontextNative(Name name)protected voiddestroySubcontextNative(Name name)StringgetNameInNamespace()NameParsergetNativeNameParser()Get the native name parser for this context.protected CloseableNamingEnumeration<Binding>listBindingsNative(Name name)protected CloseableNamingEnumeration<NameClassPair>listNative(Name name)protected ObjectlookupLinkNative(Name name)protected ObjectlookupNative(Name name)Look up a compound name within this naming system.protected voidrebindNative(Name name, Object obj)protected voidrenameNative(Name oldName, Name newName)protected voidunbindNative(Name name)-
Methods inherited from class org.wildfly.naming.client.AbstractContext
addToEnvironment, bind, bind, composeName, composeName, createSubcontext, createSubcontext, decomposeName, destroySubcontext, destroySubcontext, getEnvironment, getNameParser, getNameParser, list, list, listBindings, listBindings, lookup, lookup, lookupLink, lookupLink, nameNotFound, notSupported, readOnlyContext, rebind, rebind, removeFromEnvironment, rename, rename, unbind, unbind
-
-
-
-
Constructor Detail
-
RelativeContext
public RelativeContext(FastHashtable<String,Object> environment, AbstractContext rootContext, SimpleName prefix)
-
-
Method Detail
-
lookupNative
protected Object lookupNative(Name name) throws NamingException
Description copied from class:AbstractContextLook up a compound name within this naming system. The given name is guaranteed not to be aCompositeName.- Specified by:
lookupNativein classAbstractContext- Parameters:
name- the (compound) name (notnull)- Returns:
- the binding value
- Throws:
NamingException- if an error occurs
-
bindNative
protected void bindNative(Name name, Object obj) throws NamingException
- Overrides:
bindNativein classAbstractContext- Throws:
NamingException
-
rebindNative
protected void rebindNative(Name name, Object obj) throws NamingException
- Overrides:
rebindNativein classAbstractContext- Throws:
NamingException
-
unbindNative
protected void unbindNative(Name name) throws NamingException
- Overrides:
unbindNativein classAbstractContext- Throws:
NamingException
-
renameNative
protected void renameNative(Name oldName, Name newName) throws NamingException
- Overrides:
renameNativein classAbstractContext- Throws:
NamingException
-
listNative
protected CloseableNamingEnumeration<NameClassPair> listNative(Name name) throws NamingException
- Specified by:
listNativein classAbstractContext- Throws:
NamingException
-
listBindingsNative
protected CloseableNamingEnumeration<Binding> listBindingsNative(Name name) throws NamingException
- Specified by:
listBindingsNativein classAbstractContext- Throws:
NamingException
-
destroySubcontextNative
protected void destroySubcontextNative(Name name) throws NamingException
- Overrides:
destroySubcontextNativein classAbstractContext- Throws:
NamingException
-
createSubcontextNative
protected Context createSubcontextNative(Name name) throws NamingException
- Overrides:
createSubcontextNativein classAbstractContext- Throws:
NamingException
-
lookupLinkNative
protected Object lookupLinkNative(Name name) throws NamingException
- Specified by:
lookupLinkNativein classAbstractContext- Throws:
NamingException
-
close
public void close()
-
getNameInNamespace
public String getNameInNamespace() throws NamingException
- Throws:
NamingException
-
getNativeNameParser
public NameParser getNativeNameParser()
Description copied from class:AbstractContextGet 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.- Overrides:
getNativeNameParserin classAbstractContext- Returns:
- the name parser
-
-