public final class JavaURLContext extends Object implements Context, Cloneable
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 and Description |
|---|
JavaURLContext(Hashtable environment)
Create a context with the specified environment.
|
JavaURLContext(Hashtable env,
SerialContext serialContext)
this constructor is called from SerialContext class
|
JavaURLContext(JavaURLContext ctx,
SerialContext sctx) |
JavaURLContext(String name,
Hashtable env)
Create a context with the specified name+environment.
|
| Modifier and Type | Method and Description |
|---|---|
Object |
addToEnvironment(String propName,
Object propVal)
Add a property to the environment.
|
void |
bind(Name name,
Object obj)
Bind an object in the namespace.
|
void |
bind(String name,
Object obj)
Bind an object in the namespace.
|
void |
close()
New JNDI 1.2 operation.
|
Name |
composeName(Name name,
Name prefix) |
String |
composeName(String name,
String prefix) |
Context |
createSubcontext(Name name) |
Context |
createSubcontext(String name) |
void |
destroySubcontext(Name name)
The destroySubcontext operation is not supported by this context.
|
void |
destroySubcontext(String name)
The destroySubcontext operation is not supported by this context.
|
Hashtable |
getEnvironment()
Get the context's environment.
|
String |
getNameInNamespace()
Return the name of this context within the namespace.
|
NameParser |
getNameParser(Name name)
Return the name parser for the specified name.
|
NameParser |
getNameParser(String name)
Return the name parser for the specified name.
|
NamingEnumeration<NameClassPair> |
list(Name name)
Lists the contents of a context or subcontext.
|
NamingEnumeration<NameClassPair> |
list(String name)
Lists the contents of a context or subcontext.
|
NamingEnumeration<Binding> |
listBindings(Name name)
Lists the bindings of a context or subcontext.
|
NamingEnumeration<Binding> |
listBindings(String name)
Lists the bindings of a context or subcontext.
|
Object |
lookup(Name name)
Lookup a name in either the cosnaming or serial context.
|
Object |
lookup(String name)
Lookup an object in the serial context.
|
Object |
lookupLink(Name name)
This context does not treat links specially.
|
Object |
lookupLink(String name)
This context does not treat links specially.
|
void |
rebind(Name name,
Object obj)
Rebind an object in the namespace.
|
void |
rebind(String name,
Object obj)
Rebind an object in the namespace.
|
Object |
removeFromEnvironment(String propName)
Remove a property from the environment.
|
void |
rename(Name oldname,
Name newname)
The rename operation is not supported by this context.
|
void |
rename(String oldname,
String newname)
The rename operation is not supported by this context.
|
void |
unbind(Name name)
Unbind an object from the namespace.
|
void |
unbind(String name)
Unbind an object from the namespace.
|
public JavaURLContext(Hashtable environment) throws NamingException
NamingExceptionpublic JavaURLContext(String name, Hashtable env) throws NamingException
NamingExceptionpublic JavaURLContext(Hashtable env, SerialContext serialContext) throws NamingException
NamingExceptionpublic JavaURLContext(JavaURLContext ctx, SerialContext sctx)
public Object lookup(String name) throws NamingException
lookup in interface ContextNamingException - if there is a naming exception.public Object lookup(Name name) throws NamingException
lookup in interface ContextNamingException - if there is a naming exception.public void bind(String name, Object obj) throws NamingException
bind in interface ContextNamingException - if there is a naming exception.public void bind(Name name, Object obj) throws NamingException
bind in interface ContextNamingException - if there is a naming exception.public void rebind(String name, Object obj) throws NamingException
rebind in interface ContextNamingException - if there is a naming exception.public void rebind(Name name, Object obj) throws NamingException
rebind in interface ContextNamingException - if there is a naming exception.public void unbind(String name) throws NamingException
unbind in interface ContextNamingException - if there is a naming exception.public void unbind(Name name) throws NamingException
unbind in interface ContextNamingException - if there is a naming exception.public void rename(String oldname, String newname) throws NamingException
rename in interface ContextNamingExceptionpublic void rename(Name oldname, Name newname) throws NamingException
rename in interface ContextNamingExceptionpublic void destroySubcontext(String name) throws NamingException
destroySubcontext in interface ContextNamingExceptionpublic void destroySubcontext(Name name) throws NamingException
destroySubcontext in interface ContextNamingExceptionpublic Context createSubcontext(String name) throws NamingException
createSubcontext in interface ContextNamingExceptionpublic Context createSubcontext(Name name) throws NamingException
createSubcontext in interface ContextNamingExceptionpublic NamingEnumeration<NameClassPair> list(String name) throws NamingException
list in interface ContextNamingException - if there is a naming exception.public NamingEnumeration<NameClassPair> list(Name name) throws NamingException
list in interface ContextNamingException - if there is a naming exception.public NamingEnumeration<Binding> listBindings(String name) throws NamingException
listBindings in interface ContextNamingException - if there is a naming exception.public NamingEnumeration<Binding> listBindings(Name name) throws NamingException
listBindings in interface ContextNamingException - if there is a naming exception.public Object lookupLink(String name) throws NamingException
lookupLink in interface ContextNamingExceptionpublic Object lookupLink(Name name) throws NamingException
lookupLink in interface ContextNamingExceptionpublic NameParser getNameParser(String name) throws NamingException
getNameParser in interface ContextNamingException - if there is an exception.public NameParser getNameParser(Name name) throws NamingException
getNameParser in interface ContextNamingException - if there is an exception.public String composeName(String name, String prefix) throws NamingException
composeName in interface ContextNamingExceptionpublic Name composeName(Name name, Name prefix) throws NamingException
composeName in interface ContextNamingExceptionpublic Object addToEnvironment(String propName, Object propVal) throws NamingException
addToEnvironment in interface ContextNamingExceptionpublic Object removeFromEnvironment(String propName) throws NamingException
removeFromEnvironment in interface ContextNamingExceptionpublic Hashtable getEnvironment() throws NamingException
getEnvironment in interface ContextNamingExceptionpublic void close()
throws NamingException
close in interface ContextNamingExceptionpublic String getNameInNamespace() throws NamingException
getNameInNamespace in interface ContextNamingExceptionCopyright © 2017–2020 Eclipse Foundation. All rights reserved.