javax.naming.spi
Interface StateFactory
- All Known Subinterfaces:
- DirStateFactory
public interface StateFactory
Represents a factory, producing the object states for binding. The operation,
performed by this factory, is the reverse operation with related to the
operation, performed by the ObjectFactory. Classes, implementing
this interface, must be public and have public parameterless constructor.
- See Also:
DirStateFactory,
ObjectFactory
getStateToBind
Object getStateToBind(Object obj,
Name name,
Context nameCtx,
Hashtable<?,?> environment)
throws NamingException
- Get the object state for binding.
- Parameters:
obj - the object, for that the binding state must be retrieved. Cannot
be null.name - the name of this object, related to the nameCtx. Can be null if
not specified.nameCtx - the naming context, to that the object name is related. Can
be null if the name is related to the initial default context.environment - the properties for creating the object state. Can be
null if no properties are provided.
- Returns:
- the object state for binding, may be null if no changes are
returned by the factory
- Throws:
NamingException- See Also:
NamingManager.getStateToBind(java.lang.Object, javax.naming.Name, javax.naming.Context, java.util.Hashtable, ?>),
DirectoryManager.getStateToBind(java.lang.Object, javax.naming.Name, javax.naming.Context, java.util.Hashtable, ?>, javax.naming.directory.Attributes)