Package org.wildfly.naming.client
Interface NamingContextFactory
-
- All Known Implementing Classes:
RemoteNamingContextFactory
public interface NamingContextFactoryA context factory which maps naming providers and name schemes to actual naming contexts.- Author:
- David M. Lloyd
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ContextcreateRootContext(NamingProvider namingProvider, String nameScheme, FastHashtable<String,Object> env, ProviderEnvironment providerEnvironment)Create the root context for this naming scheme.booleansupportsUriScheme(NamingProvider namingProvider, String nameScheme)Determine if this factory supports the given provider and name scheme.
-
-
-
Method Detail
-
supportsUriScheme
boolean supportsUriScheme(NamingProvider namingProvider, String nameScheme)
Determine if this factory supports the given provider and name scheme. This method is called when a JNDI operation is executed on an initial context to determine which provider should handle the operation.A context factory should evaluate the provider's type to determine if the provider is compatible with the naming scheme, and should not support producing contexts for unknown providers.
- Parameters:
namingProvider- the naming provider which is handling this request, ornullif it is localnameScheme- the JNDI name scheme, ornullif no name scheme was given- Returns:
trueif this factory supports the given scheme,falseotherwise
-
createRootContext
Context createRootContext(NamingProvider namingProvider, String nameScheme, FastHashtable<String,Object> env, ProviderEnvironment providerEnvironment) throws NamingException
Create the root context for this naming scheme. The context should capture any locally relevant information, such as the relevant local security or authentication context.- Parameters:
namingProvider- the naming provider which is handling this request, ornullif it is localnameScheme- the scheme in the name, ornullif there is no name URL schemeenv- a copy of the environment which may be consumed directly by the provider (notnull)providerEnvironment- the provider environment (notnull)- Returns:
- the root context (must not be
null) - Throws:
NamingException- if the root context creation failed for some reason
-
-