javax.naming.spi
public interface ObjectFactory
StateFactory
. Classes, implementing this interface, must be public
and have public parameterless constructor.Object getObjectInstance(Object refObj, Name name, Context nameCtx, Hashtable<?,?> environment) throws Exception
refObj
- may provide the reference and location information. Can be null.name
- the name of the new object in the scope of the specified naming
context. Can be null if the name is not specified.nameCtx
- the context, in which the object name is specified. Can be
null if the name is specified in the scope of the default initial
context.environment
- the properties, providing additional information on how
to create an object. Can be null if not additional information is
provided.Exception
- if this factory suggest not to try creating of this
object by other alternative factoriesNamingManager.getObjectInstance(Object, Name, Context, Hashtable)