java.lang.Object
cloud.piranha.naming.impl.DefaultInitialContext
- All Implemented Interfaces:
Context
The default InitialContext.
- Author:
- Manfred Riem ([email protected])
-
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
-
Method Summary
Modifier and TypeMethodDescriptionaddToEnvironment(String name, Object value)
Add to the environment.void
Bind the object to the given name.void
Bind the object to the given name.void
close()
Close the context.composeName(String name, String prefix)
Compose the name.composeName(Name name, Name prefix)
Compose the name.createSubcontext(String name)
Create a sub context.createSubcontext(Name name)
Create a sub context.void
destroySubcontext(String name)
Destroy the sub context.void
destroySubcontext(Name name)
Destroy the sub context.Hashtable<?,?>
Returns the environment.Get the name in the namespace.getNameParser(String name)
Returns the name parser.getNameParser(Name name)
Returns the name parser.List the entries for the given name.List the names in the named context.listBindings(String name)
List the bindings.listBindings(Name name)
List the bindings.Lookup the name.Look the name.lookupLink(String name)
Lookup the link.lookupLink(Name name)
Lookup the link.void
Rebind to the given name.void
Rebind the name.removeFromEnvironment(String name)
Remove the property from the environment.void
Rename the object.void
Rename the object.void
Unbind the specified name.void
Unbind the specified name.
-
Constructor Details
-
DefaultInitialContext
public DefaultInitialContext()Constructor. -
DefaultInitialContext
public DefaultInitialContext(boolean closeable)Constructor.- Parameters:
closeable
- the closeable flag.
-
-
Method Details
-
addToEnvironment
Add to the environment.- Specified by:
addToEnvironment
in interfaceContext
- Parameters:
name
- the name of the property.value
- the value of the property.- Returns:
- the previous value, or null if none.
- Throws:
NamingException
- when a Naming error occurs.
-
bind
Bind the object to the given name.- Specified by:
bind
in interfaceContext
- Parameters:
name
- the name.object
- the object.- Throws:
NamingException
- when a naming error occurs.
-
bind
Bind the object to the given name.- Specified by:
bind
in interfaceContext
- Parameters:
name
- the name.object
- the object.- Throws:
NamingException
- when an naming error occurs.
-
close
Close the context. If the closeable flag is set to true it will close the context for further use, otherwise this call has no effect.- Specified by:
close
in interfaceContext
- Throws:
NamingException
- when a naming error occurs.
-
createSubcontext
Create a sub context.- Specified by:
createSubcontext
in interfaceContext
- Parameters:
name
- the name.- Returns:
- the sub context.
- Throws:
NamingException
- when a naming error occurs.
-
createSubcontext
Create a sub context.- Specified by:
createSubcontext
in interfaceContext
- Parameters:
name
- the name.- Returns:
- the sub context.
- Throws:
NamingException
- when a naming error occurs.
-
composeName
Compose the name.- Specified by:
composeName
in interfaceContext
- Parameters:
name
- the name.prefix
- the prefix.- Returns:
- the name.
- Throws:
NamingException
- when a naming error occurs.
-
composeName
Compose the name.- Specified by:
composeName
in interfaceContext
- Parameters:
name
- the name.prefix
- the prefix.- Returns:
- the name.
- Throws:
NamingException
- when a naming error occurs.
-
destroySubcontext
Destroy the sub context.- Specified by:
destroySubcontext
in interfaceContext
- Parameters:
name
- the name.- Throws:
NamingException
- when a naming error occurs.
-
destroySubcontext
Destroy the sub context.- Specified by:
destroySubcontext
in interfaceContext
- Parameters:
name
- the name.- Throws:
NamingException
- when a naming error occurs.
-
getEnvironment
Returns the environment.- Specified by:
getEnvironment
in interfaceContext
- Returns:
- the environment
- Throws:
NamingException
- when a naming error occurs.
-
getNameInNamespace
Get the name in the namespace.- Specified by:
getNameInNamespace
in interfaceContext
- Returns:
- the name in its own namespace.
- Throws:
NamingException
- when a naming error occurs.
-
getNameParser
Returns the name parser.- Specified by:
getNameParser
in interfaceContext
- Parameters:
name
- the name.- Returns:
- the name parser
- Throws:
NamingException
- when a serious error occurs.
-
getNameParser
Returns the name parser.- Specified by:
getNameParser
in interfaceContext
- Parameters:
name
- the name parser.- Returns:
- the name parser
- Throws:
NamingException
- when a serious error occurs.
-
list
List the names in the named context.- Specified by:
list
in interfaceContext
- Parameters:
name
- the name.- Returns:
- the enumeration.
- Throws:
NamingException
- when a naming error occurs.
-
list
List the entries for the given name.- Specified by:
list
in interfaceContext
- Parameters:
name
- the name.- Returns:
- the name class pair enumeration.
- Throws:
NamingException
- when a naming error occurs.
-
listBindings
List the bindings.- Specified by:
listBindings
in interfaceContext
- Parameters:
name
- the name.- Returns:
- the bindings.
- Throws:
NamingException
- when a naming error occurs.
-
listBindings
List the bindings.- Specified by:
listBindings
in interfaceContext
- Parameters:
name
- the name.- Returns:
- the bindings.
- Throws:
NamingException
- when a naming error occurs.
-
lookup
Look the name.- Specified by:
lookup
in interfaceContext
- Parameters:
name
- the name.- Returns:
- the object.
- Throws:
NamingException
- when a naming error occurs.
-
lookup
Lookup the name.- Specified by:
lookup
in interfaceContext
- Parameters:
name
- the name.- Returns:
- the object.
- Throws:
NamingException
- when a naming error occurs.
-
lookupLink
Lookup the link.- Specified by:
lookupLink
in interfaceContext
- Parameters:
name
- the name.- Returns:
- the link.
- Throws:
NamingException
- when a naming error occurs.
-
lookupLink
Lookup the link.- Specified by:
lookupLink
in interfaceContext
- Parameters:
name
- the name.- Returns:
- the link.
- Throws:
NamingException
- when a naming error occurs.
-
rebind
Rebind the name.- Specified by:
rebind
in interfaceContext
- Parameters:
name
- the name.object
- the object.- Throws:
NamingException
- when a naming error occurs.
-
rebind
Rebind to the given name.- Specified by:
rebind
in interfaceContext
- Parameters:
name
- the name.obj
- the object.- Throws:
NamingException
- when a naming error occurs.
-
removeFromEnvironment
Remove the property from the environment.- Specified by:
removeFromEnvironment
in interfaceContext
- Parameters:
name
- the property name.- Returns:
- the value, or null if not found.
- Throws:
NamingException
- when a naming error occurs.
-
rename
Rename the object.- Specified by:
rename
in interfaceContext
- Parameters:
oldName
- the old name.newName
- the new name.- Throws:
NamingException
- when a naming error occurs.
-
rename
Rename the object.- Specified by:
rename
in interfaceContext
- Parameters:
oldName
- the old name.newName
- the new name.- Throws:
NamingException
- when a naming error occurs.
-
unbind
Unbind the specified name.- Specified by:
unbind
in interfaceContext
- Parameters:
name
- the name.- Throws:
NamingException
- when a naming error occurs.
-
unbind
Unbind the specified name.- Specified by:
unbind
in interfaceContext
- Parameters:
name
- the name.- Throws:
NamingException
- when a naming error occurs.
-