Top Description Fields Constructors Methods
org.apache.naming.java

public Class javaURLContextFactory

extends Object
implements ObjectFactory, InitialContextFactory
Class Inheritance
All Implemented Interfaces
javax.naming.spi.InitialContextFactory, javax.naming.spi.ObjectFactory
Imports
java.util.Hashtable, javax.naming.Context, .Name, .NamingException, javax.naming.spi.InitialContextFactory, .ObjectFactory, org.apache.naming.ContextBindings, .NamingContext, .SelectorContext

Context factory for the "java:" namespace.

Important note : This factory MUST be associated with the "java" URL prefix, which can be done by either :

Author
Remy Maucherat

Field Summary

Modifier and TypeField and Description
protected static volatile Context
initialContext

Initial context.

public static final String

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Context
getInitialContext(Hashtable<?, ?>
The possibly null environment specifying information to be used in the creation of the initial context.
environment
)

Implements javax.naming.spi.InitialContextFactory.getInitialContext.

Get a new (writable) initial context.

public Object
getObjectInstance(Object
The possibly null object containing location or reference information that can be used in creating an object.
obj
,
Name
The name of this object relative to nameCtx, or null if no name is specified.
name
,
Context
The context relative to which the name parameter is specified, or null if name is relative to the default initial context.
nameCtx
,
Hashtable<?, ?>
The possibly null environment that is used in creating the object.
environment
)

Implements javax.naming.spi.ObjectFactory.getObjectInstance.

Crete a new Context's instance.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

initialContextback to summary
protected static volatile Context initialContext

Initial context.

MAINback to summary
public static final String MAIN

Constructor Detail

javaURLContextFactoryback to summary
public javaURLContextFactory()

Method Detail

getInitialContextback to summary
public Context getInitialContext(Hashtable<?, ?> environment) throws NamingException

Implements javax.naming.spi.InitialContextFactory.getInitialContext.

Get a new (writable) initial context.

Parameters
environment:Hashtable<?, ?>

Doc from javax.naming.spi.InitialContextFactory.getInitialContext.

The possibly null environment specifying information to be used in the creation of the initial context.

Returns:Context

Doc from javax.naming.spi.InitialContextFactory.getInitialContext.

A non-null initial context object that implements the Context interface.

Annotations
@SuppressWarnings:unchecked
@Override
Exceptions
NamingException:

Doc from javax.naming.spi.InitialContextFactory.getInitialContext.

If cannot create an initial context.

getObjectInstanceback to summary
public Object getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable<?, ?> environment) throws NamingException

Implements javax.naming.spi.ObjectFactory.getObjectInstance.

Crete a new Context's instance.

Parameters
obj:Object

Doc from javax.naming.spi.ObjectFactory.getObjectInstance.

The possibly null object containing location or reference information that can be used in creating an object.

name:Name

Doc from javax.naming.spi.ObjectFactory.getObjectInstance.

The name of this object relative to nameCtx, or null if no name is specified.

nameCtx:Context

Doc from javax.naming.spi.ObjectFactory.getObjectInstance.

The context relative to which the name parameter is specified, or null if name is relative to the default initial context.

environment:Hashtable<?, ?>

Doc from javax.naming.spi.ObjectFactory.getObjectInstance.

The possibly null environment that is used in creating the object.

Returns:Object

Doc from javax.naming.spi.ObjectFactory.getObjectInstance.

The object created; null if an object cannot be created.

Annotations
@SuppressWarnings:unchecked
@Override