Package com.sun.enterprise.naming.impl
Class TransientContext
java.lang.Object
com.sun.enterprise.naming.impl.TransientContext
- All Implemented Interfaces:
Serializable,Context
Class to implement multiple level of subcontexts in SerialContext.
To use this class a new object of class InitialContext (env) should be instantiated.
The env i.e the Environment is initialised with SerialInitContextFactory. An example for using this is in /test/subcontext
- See Also:
-
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 -
Method Summary
Modifier and TypeMethodDescriptionaddToEnvironment(String propName, Object propVal) Add the property name and value to the environment.voidBind the object to the specified name.voidBind the object to the specified name.voidclose()Resets the environemnt to null and clears all bindings.composeName(String name, String prefix) Compose a new name specified by name and prefix.composeName(Name name, Name prefix) Compose a new name specified by name and prefix.createSubcontext(String name) Create a subcontext with the specified name.createSubcontext(Name name) Create a subcontext with the specified name.voiddestroySubcontext(String name) Destroy the subcontext with the specified name.voiddestroySubcontext(Name name) Destroy the subcontext with the specified name.List the current environment.Operation not supported.getNameParser(String name) List the NameParser specified by name.getNameParser(Name name) List the NameParser specified by name.list()list the objects stored by the current contextList the objects specified by name.List the objects specified by name.listBindings(String name) List the bindings of objects present in name.listBindings(Name name) List the binding of objects specified by name.listContext(String name) List the objects specified by name.Lookup the specified name.Lookup the specified name.lookupLink(String name) Lookup the name.lookupLink(Name name) Lookup name.voidRebinds the object specified by namevoidBinds or rebinds the object specified by nameremoveFromEnvironment(String propName) Remove property from the environment.voidRename the object specified by oldname to newnamevoidRename the object specified by oldname to newnamevoidUnbinds the object specified by name.voidUnbinds the object specified by name
-
Constructor Details
-
TransientContext
public TransientContext()
-
-
Method Details
-
createSubcontext
Create a subcontext with the specified name.- Specified by:
createSubcontextin interfaceContext- Returns:
- the created subcontext.
- Throws:
NamingException- if there is a naming exception.
-
createSubcontext
Create a subcontext with the specified name.- Specified by:
createSubcontextin interfaceContext- Returns:
- the created subcontext.
- Throws:
NamingException- if there is a naming exception.
-
destroySubcontext
Destroy the subcontext with the specified name.- Specified by:
destroySubcontextin interfaceContext- Throws:
NamingException- if there is a naming exception.
-
destroySubcontext
Destroy the subcontext with the specified name.- Specified by:
destroySubcontextin interfaceContext- Throws:
NamingException- if there is a naming exception.
-
lookup
Lookup the specified name.- Specified by:
lookupin interfaceContext- Returns:
- the object or context bound to the name.
- Throws:
NamingException- if there is a naming exception.
-
lookup
Lookup the specified name.- Specified by:
lookupin interfaceContext- Returns:
- the object or context bound to the name.
- Throws:
NamingException- if there is a naming exception.
-
bind
Bind the object to the specified name.- Specified by:
bindin interfaceContext- Throws:
NamingException- if there is a naming exception.
-
bind
Bind the object to the specified name.- Specified by:
bindin interfaceContext- Throws:
NamingException- if there is a naming exception.
-
rebind
Rebinds the object specified by name- Specified by:
rebindin interfaceContext- Throws:
NamingException- if there is a naming exception
-
rebind
Binds or rebinds the object specified by name- Specified by:
rebindin interfaceContext- Throws:
NamingException- if there is a naming exception
-
unbind
Unbinds the object specified by name. Calls itself recursively to traverse down the context tree and unbind the object.- Specified by:
unbindin interfaceContext- Throws:
NamingException- if there is a naming exception
-
unbind
Unbinds the object specified by name- Specified by:
unbindin interfaceContext- Throws:
NamingException- if there is a naming exception
-
rename
Rename the object specified by oldname to newname- Specified by:
renamein interfaceContext- Throws:
NamingException- if there is a naming exception
-
rename
Rename the object specified by oldname to newname- Specified by:
renamein interfaceContext- Throws:
NamingException- if there is a naming exception
-
list
list the objects stored by the current context -
listContext
List the objects specified by name.- Throws:
NamingException- if there is a naming exception
-
list
List the objects specified by name.- Specified by:
listin interfaceContext- Throws:
NamingException- if there is a naming exception
-
list
List the objects specified by name.- Specified by:
listin interfaceContext- Throws:
NamingException- if there is a naming exception
-
listBindings
List the bindings of objects present in name.- Specified by:
listBindingsin interfaceContext- Throws:
NamingException- if there is a naming exception
-
listBindings
List the binding of objects specified by name.- Specified by:
listBindingsin interfaceContext- Throws:
NamingException- if there is a naming exception
-
lookupLink
Lookup the name.- Specified by:
lookupLinkin interfaceContext- Throws:
NamingException- if there is a naming exception
-
lookupLink
Lookup name.- Specified by:
lookupLinkin interfaceContext- Throws:
NamingException- if there is a naming exception
-
getNameParser
List the NameParser specified by name.- Specified by:
getNameParserin interfaceContext- Throws:
NamingException- if there is a naming exception
-
getNameParser
List the NameParser specified by name.- Specified by:
getNameParserin interfaceContext- Throws:
NamingException- if there is a naming exception
-
composeName
Compose a new name specified by name and prefix.- Specified by:
composeNamein interfaceContext- Returns:
- null
- Throws:
NamingException- if there is a naming exception
-
composeName
Compose a new name specified by name and prefix.- Specified by:
composeNamein interfaceContext- Returns:
- Name result of the concatenation
- Throws:
NamingException- if there is a naming exception
-
addToEnvironment
Add the property name and value to the environment.- Specified by:
addToEnvironmentin interfaceContext- Throws:
NamingException- if there is a naming exception
-
removeFromEnvironment
Remove property from the environment.- Specified by:
removeFromEnvironmentin interfaceContext- Throws:
NamingException- if there is a naming exception
-
getEnvironment
List the current environment.- Specified by:
getEnvironmentin interfaceContext- Throws:
NamingException- if there is a naming exception
-
close
Resets the environemnt to null and clears all bindings. However theTransientContextinstance can be used again.- Specified by:
closein interfaceContext- Throws:
NamingException
-
getNameInNamespace
Operation not supported.- Specified by:
getNameInNamespacein interfaceContext- Throws:
NamingException
-