Package org.jboss.as.naming
Class InitialContext
- java.lang.Object
-
- javax.naming.InitialContext
-
- javax.naming.directory.InitialDirContext
-
- javax.naming.ldap.InitialLdapContext
-
- org.jboss.as.naming.InitialContext
-
- All Implemented Interfaces:
Context,DirContext,LdapContext
public class InitialContext extends InitialLdapContext
- Author:
- Eduardo Martins, John Bailey
-
-
Field Summary
-
Fields inherited from class javax.naming.InitialContext
defaultInitCtx, gotDefault, myProps
-
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
-
Fields inherited from interface javax.naming.directory.DirContext
ADD_ATTRIBUTE, REMOVE_ATTRIBUTE, REPLACE_ATTRIBUTE
-
Fields inherited from interface javax.naming.ldap.LdapContext
CONTROL_FACTORIES
-
-
Constructor Summary
Constructors Constructor Description InitialContext(Hashtable<?,?> environment)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static voidaddUrlContextFactory(String scheme, ObjectFactory factory)Add an ObjectFactory to handle requests for a specific URL scheme.protected ContextgetDefaultInitCtx()protected ContextgetURLOrDefaultInitCtx(String name)protected ContextgetURLOrDefaultInitCtx(Name name)static StringgetURLScheme(String str)protected voidinit(Hashtable<?,?> environment)static voidremoveUrlContextFactory(String scheme, ObjectFactory factory)Remove an ObjectFactory from the map of registered ones.-
Methods inherited from class javax.naming.ldap.InitialLdapContext
extendedOperation, getConnectControls, getRequestControls, getResponseControls, newInstance, reconnect, setRequestControls
-
Methods inherited from class javax.naming.directory.InitialDirContext
bind, bind, createSubcontext, createSubcontext, getAttributes, getAttributes, getAttributes, getAttributes, getSchema, getSchema, getSchemaClassDefinition, getSchemaClassDefinition, modifyAttributes, modifyAttributes, modifyAttributes, modifyAttributes, rebind, rebind, search, search, search, search, search, search, search, search
-
Methods inherited from class javax.naming.InitialContext
addToEnvironment, bind, bind, close, composeName, composeName, createSubcontext, createSubcontext, destroySubcontext, destroySubcontext, doLookup, doLookup, getEnvironment, getNameInNamespace, getNameParser, getNameParser, list, list, listBindings, listBindings, lookup, lookup, lookupLink, lookupLink, rebind, rebind, removeFromEnvironment, rename, rename, unbind, unbind
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface javax.naming.Context
addToEnvironment, bind, bind, close, composeName, composeName, createSubcontext, createSubcontext, destroySubcontext, destroySubcontext, getEnvironment, getNameInNamespace, getNameParser, getNameParser, list, list, listBindings, listBindings, lookup, lookup, lookupLink, lookupLink, rebind, rebind, removeFromEnvironment, rename, rename, unbind, unbind
-
Methods inherited from interface javax.naming.directory.DirContext
bind, bind, createSubcontext, createSubcontext, getAttributes, getAttributes, getAttributes, getAttributes, getSchema, getSchema, getSchemaClassDefinition, getSchemaClassDefinition, modifyAttributes, modifyAttributes, modifyAttributes, modifyAttributes, rebind, rebind, search, search, search, search, search, search, search, search
-
-
-
-
Constructor Detail
-
InitialContext
public InitialContext(Hashtable<?,?> environment) throws NamingException
- Throws:
NamingException
-
-
Method Detail
-
addUrlContextFactory
public static void addUrlContextFactory(String scheme, ObjectFactory factory)
Add an ObjectFactory to handle requests for a specific URL scheme.- Parameters:
scheme- The URL scheme to handle.factory- The ObjectFactory that can handle the requests.
-
removeUrlContextFactory
public static void removeUrlContextFactory(String scheme, ObjectFactory factory)
Remove an ObjectFactory from the map of registered ones. To make sure that not anybody can remove an ObjectFactory both the scheme as well as the actual object factory itself need to be supplied. So you can only remove the factory if you have the factory object.- Parameters:
scheme- The URL scheme for which the handler is registered.factory- The factory object associated with the scheme- Throws:
IllegalArgumentException- if the requested scheme/factory combination is not registered.
-
init
protected void init(Hashtable<?,?> environment) throws NamingException
- Overrides:
initin classInitialContext- Throws:
NamingException
-
getDefaultInitCtx
protected Context getDefaultInitCtx() throws NamingException
- Overrides:
getDefaultInitCtxin classInitialContext- Throws:
NamingException
-
getURLOrDefaultInitCtx
protected Context getURLOrDefaultInitCtx(String name) throws NamingException
- Overrides:
getURLOrDefaultInitCtxin classInitialContext- Throws:
NamingException
-
getURLOrDefaultInitCtx
protected Context getURLOrDefaultInitCtx(Name name) throws NamingException
- Overrides:
getURLOrDefaultInitCtxin classInitialContext- Throws:
NamingException
-
-