APIdia Launch Partner
Top Fields Constructors Methods
com.sun.naming.internal

public Class NamingManagerHelper

extends Object
Class Inheritance
Imports
javax.naming.Context, .Name, .NamingException, .RefAddr, .Reference, .Referenceable, .StringRefAddr, javax.naming.directory.Attributes, javax.naming.spi.DirObjectFactory, .ObjectFactory, .ObjectFactoryBuilder, java.net.MalformedURLException, java.util.Hashtable, java.util.function.Predicate

Field Summary

Modifier and TypeField and Description
private static final String
pack-priv static final VersionHelper
private static ObjectFactoryBuilder

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private static Object

Returns:

factory created; null if cannot create
createObjectFromFactories
(Object obj, Name name, Context nameCtx, Hashtable<?, ?> environment, Attributes attrs)

Creates an object using the factories specified in the Context.OBJECT_FACTORIES property of the environment or of the provider resource file associated with nameCtx.

private static Object

Returns:

factory created; null if cannot create
createObjectFromFactories
(Object obj, Name name, Context nameCtx, Hashtable<?, ?> environment)

Creates an object using the factories specified in the Context.OBJECT_FACTORIES property of the environment or of the provider resource file associated with nameCtx.

public static Object
getDirObjectInstance(Object refInfo, Name name, Context nameCtx, Hashtable<?, ?> environment, Attributes attrs, Predicate<Class<?>> factoryFilter)

public static synchronized ObjectFactoryBuilder
pack-priv static ObjectFactory

Returns:

The object factory for the object identified by ref; null if unable to load the factory.
getObjectFactoryFromReference
(Reference
The non-null reference to use.
ref
,
String
The non-null class name of the factory.
factoryName
,
Predicate<Class<?>> filter)

Retrieves the ObjectFactory for the object identified by a reference, using the reference's factory class name and factory codebase to load in the factory's class.

public static Object
getObjectInstance(Object refInfo, Name name, Context nameCtx, Hashtable<?, ?> environment, Predicate<Class<?>> factoryFilter)

private static Object
getURLObject(String
the URL scheme id for the context
scheme
,
Object
information used to create the context
urlInfo
,
Name
name of this object relative to nameCtx
name
,
Context
Context whose provider resource file will be searched for package prefix values (or null if none)
nameCtx
,
Hashtable<?, ?>
Environment properties for creating the context
environment
)

Creates an object for the given URL scheme id using the supplied urlInfo.

private static String
private static Object
processURL(Object refInfo, Name name, Context nameCtx, Hashtable<?, ?> environment)

pack-priv static Object
processURLAddrs(Reference ref, Name name, Context nameCtx, Hashtable<?, ?> environment)

public static synchronized void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

DEFAULT_PKG_PREFIXback to summary
private static final String DEFAULT_PKG_PREFIX
helperback to summary
pack-priv static final VersionHelper helper
object_factory_builderback to summary
private static ObjectFactoryBuilder object_factory_builder

Constructor Detail

NamingManagerHelperback to summary
public NamingManagerHelper()

Method Detail

createObjectFromFactoriesback to summary
private static Object createObjectFromFactories(Object obj, Name name, Context nameCtx, Hashtable<?, ?> environment, Attributes attrs) throws Exception

Creates an object using the factories specified in the Context.OBJECT_FACTORIES property of the environment or of the provider resource file associated with nameCtx.

Returns:Object

factory created; null if cannot create

createObjectFromFactoriesback to summary
private static Object createObjectFromFactories(Object obj, Name name, Context nameCtx, Hashtable<?, ?> environment) throws Exception

Creates an object using the factories specified in the Context.OBJECT_FACTORIES property of the environment or of the provider resource file associated with nameCtx.

Returns:Object

factory created; null if cannot create

getDirObjectInstanceback to summary
public static Object getDirObjectInstance(Object refInfo, Name name, Context nameCtx, Hashtable<?, ?> environment, Attributes attrs, Predicate<Class<?>> factoryFilter) throws Exception
getObjectFactoryBuilderback to summary
public static synchronized ObjectFactoryBuilder getObjectFactoryBuilder()
getObjectFactoryFromReferenceback to summary
pack-priv static ObjectFactory getObjectFactoryFromReference(Reference ref, String factoryName, Predicate<Class<?>> filter) throws IllegalAccessException, InstantiationException

Retrieves the ObjectFactory for the object identified by a reference, using the reference's factory class name and factory codebase to load in the factory's class.

Parameters
ref:Reference

The non-null reference to use.

factoryName:String

The non-null class name of the factory.

Returns:ObjectFactory

The object factory for the object identified by ref; null if unable to load the factory.

getObjectInstanceback to summary
public static Object getObjectInstance(Object refInfo, Name name, Context nameCtx, Hashtable<?, ?> environment, Predicate<Class<?>> factoryFilter) throws Exception
getURLObjectback to summary
private static Object getURLObject(String scheme, Object urlInfo, Name name, Context nameCtx, Hashtable<?, ?> environment) throws NamingException

Creates an object for the given URL scheme id using the supplied urlInfo.

If urlInfo is null, the result is a context for resolving URLs with the scheme id 'scheme'. If urlInfo is a URL, the result is a context named by the URL. Names passed to this context is assumed to be relative to this context (i.e. not a URL). For example, if urlInfo is "ldap://ldap.wiz.com/o=Wiz,c=us", the resulting context will be that pointed to by "o=Wiz,c=us" on the server 'ldap.wiz.com'. Subsequent names that can be passed to this context will be LDAP names relative to this context (e.g. cn="Barbs Jensen"). If urlInfo is an array of URLs, the URLs are assumed to be equivalent in terms of the context to which they refer. The resulting context is like that of the single URL case. If urlInfo is of any other type, that is handled by the context factory for the URL scheme.

Parameters
scheme:String

the URL scheme id for the context

urlInfo:Object

information used to create the context

name:Name

name of this object relative to nameCtx

nameCtx:Context

Context whose provider resource file will be searched for package prefix values (or null if none)

environment:Hashtable<?, ?>

Environment properties for creating the context

See Also
javax.naming.InitialContext
getURLSchemeback to summary
private static String getURLScheme(String str)
processURLback to summary
private static Object processURL(Object refInfo, Name name, Context nameCtx, Hashtable<?, ?> environment) throws NamingException
processURLAddrsback to summary
pack-priv static Object processURLAddrs(Reference ref, Name name, Context nameCtx, Hashtable<?, ?> environment) throws NamingException
setObjectFactoryBuilderback to summary
public static synchronized void setObjectFactoryBuilder(ObjectFactoryBuilder builder) throws NamingException