Package com.sun.enterprise.naming.impl
Class JavaURLContext
java.lang.Object
com.sun.enterprise.naming.impl.JavaURLContext
This class is a context implementation for the java:* namespaces.
The context determines the component id from the invocation manager
of the component that is invoking the method and then looks up the
object in that component's local namespace.
-
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
ConstructorsConstructorDescriptionCreate a context with the same name and env.JavaURLContext(JavaURLContext ctx, SerialContext serialContext) JavaURLContext(Hashtable<Object, Object> environment, SerialContext serialContext) JavaURLContext(org.glassfish.api.naming.SimpleJndiName name) Create a context with the specified environment.JavaURLContext(org.glassfish.api.naming.SimpleJndiName name, Hashtable<Object, Object> environment) Create a context with the specified name+environment. -
Method Summary
Modifier and TypeMethodDescriptionaddToEnvironment(String propName, Object propVal) Add a property to the environment.voidBind an object in the namespace.voidBind an object in the namespace.voidclose()New JNDI 1.2 operation.composeName(String name, String prefix) composeName(Name name, Name prefix) createSubcontext(String name) createSubcontext(Name name) voiddestroySubcontext(String name) The destroySubcontext operation is not supported by this context.voiddestroySubcontext(Name name) The destroySubcontext operation is not supported by this context.Hashtable<?,?> Get the context's environment.org.glassfish.api.naming.SimpleJndiNamegetName()Return the name of this context within the namespace.getNameParser(String name) Return the name parser for the specified name.getNameParser(Name name) Return the name parser for the specified name.Lists the contents of a context or subcontext.Lists the contents of a context or subcontext.listBindings(String name) Lists the bindings of a context or subcontext.listBindings(Name name) Lists the bindings of a context or subcontext.Lookup an object in the serial context.Lookup a name in either the cosnaming or serial context.lookupLink(String name) This context does not treat links specially.lookupLink(Name name) This context does not treat links specially.voidRebind an object in the namespace.voidRebind an object in the namespace.removeFromEnvironment(String propName) Remove a property from the environment.voidThe rename operation is not supported by this context.voidThe rename operation is not supported by this context.toString()voidUnbind an object from the namespace.voidUnbind an object from the namespace.
-
Constructor Details
-
JavaURLContext
public JavaURLContext(org.glassfish.api.naming.SimpleJndiName name) Create a context with the specified environment. -
JavaURLContext
public JavaURLContext(org.glassfish.api.naming.SimpleJndiName name, Hashtable<Object, Object> environment) Create a context with the specified name+environment. -
JavaURLContext
-
JavaURLContext
Create a context with the same name and env. -
JavaURLContext
-
-
Method Details
-
lookup
Lookup an object in the serial context.- Specified by:
lookupin interfaceContext- Returns:
- the object that is being looked up.
- Throws:
NamingException- if there is a naming exception.
-
lookup
Lookup a name in either the cosnaming or serial context.- Specified by:
lookupin interfaceContext- Returns:
- the object that is being looked up.
- Throws:
NamingException- if there is a naming exception.
-
bind
Bind an object in the namespace. Binds the reference to the actual object in either the cosnaming or serial context.- Specified by:
bindin interfaceContext- Throws:
NamingException- if there is a naming exception.
-
bind
Bind an object in the namespace. Binds the reference to the actual object in either the cosnaming or serial context.- Specified by:
bindin interfaceContext- Throws:
NamingException- if there is a naming exception.
-
rebind
Rebind an object in the namespace. Rebinds the reference to the actual object in either the cosnaming or serial context.- Specified by:
rebindin interfaceContext- Throws:
NamingException- if there is a naming exception.
-
rebind
Rebind an object in the namespace. Rebinds the reference to the actual object in either the cosnaming or serial context.- Specified by:
rebindin interfaceContext- Throws:
NamingException- if there is a naming exception.
-
unbind
Unbind an object from the namespace.- Specified by:
unbindin interfaceContext- Throws:
NamingException- if there is a naming exception.
-
unbind
Unbind an object from the namespace.- Specified by:
unbindin interfaceContext- Throws:
NamingException- if there is a naming exception.
-
rename
The rename operation is not supported by this context. It throws an OperationNotSupportedException.- Specified by:
renamein interfaceContext- Throws:
NamingException
-
rename
The rename operation is not supported by this context. It throws an OperationNotSupportedException.- Specified by:
renamein interfaceContext- Throws:
NamingException
-
destroySubcontext
The destroySubcontext operation is not supported by this context. It throws an OperationNotSupportedException.- Specified by:
destroySubcontextin interfaceContext- Throws:
NamingException
-
destroySubcontext
The destroySubcontext operation is not supported by this context. It throws an OperationNotSupportedException.- Specified by:
destroySubcontextin interfaceContext- Throws:
NamingException
-
createSubcontext
- Specified by:
createSubcontextin interfaceContext- Throws:
NamingException
-
createSubcontext
- Specified by:
createSubcontextin interfaceContext- Throws:
NamingException
-
list
Lists the contents of a context or subcontext. The operation is delegated to the serial context.- Specified by:
listin interfaceContext- Returns:
- an enumeration of the contents of the context.
- Throws:
NamingException- if there is a naming exception.
-
list
Lists the contents of a context or subcontext. The operation is delegated to the serial context.- Specified by:
listin interfaceContext- Returns:
- an enumeration of the contents of the context.
- Throws:
NamingException- if there is a naming exception.
-
listBindings
Lists the bindings of a context or subcontext. The operation is delegated to the serial context.- Specified by:
listBindingsin interfaceContext- Returns:
- an enumeration of the bindings of the context.
- Throws:
NamingException- if there is a naming exception.
-
listBindings
Lists the bindings of a context or subcontext. The operation is delegated to the serial context.- Specified by:
listBindingsin interfaceContext- Returns:
- an enumeration of the bindings of the context.
- Throws:
NamingException- if there is a naming exception.
-
lookupLink
This context does not treat links specially. A lookup operation is performed.- Specified by:
lookupLinkin interfaceContext- Throws:
NamingException
-
lookupLink
This context does not treat links specially. A lookup operation is performed.- Specified by:
lookupLinkin interfaceContext- Throws:
NamingException
-
getNameParser
Return the name parser for the specified name.- Specified by:
getNameParserin interfaceContext- Returns:
- the NameParser instance.
- Throws:
NamingException- if there is an exception.
-
getNameParser
Return the name parser for the specified name.- Specified by:
getNameParserin interfaceContext- Returns:
- the NameParser instance.
- Throws:
NamingException- if there is an exception.
-
composeName
- Specified by:
composeNamein interfaceContext- Throws:
NamingException
-
composeName
- Specified by:
composeNamein interfaceContext- Throws:
NamingException
-
addToEnvironment
Add a property to the environment.- Specified by:
addToEnvironmentin interfaceContext- Throws:
NamingException
-
removeFromEnvironment
Remove a property from the environment.- Specified by:
removeFromEnvironmentin interfaceContext- Throws:
NamingException
-
getEnvironment
Get the context's environment.- Specified by:
getEnvironmentin interfaceContext- Throws:
NamingException
-
close
New JNDI 1.2 operation.- Specified by:
closein interfaceContext- Throws:
NamingException
-
getName
public org.glassfish.api.naming.SimpleJndiName getName()- Returns:
- my name, never null.
-
getNameInNamespace
Return the name of this context within the namespace. The name can be passed as an argument to new InitialContext().lookup() to retrieve this context.- Specified by:
getNameInNamespacein interfaceContext- Throws:
NamingException
-
toString
-