javax.naming.spi

Interface StateFactory

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 {@link ObjectFactory}. Classes, implementing this interface, must be public and have public parameterless constructor.

See Also: DirStateFactory ObjectFactory

Method Summary
ObjectgetStateToBind(Object obj, Name name, Context nameCtx, Hashtable<?,?> environment)
Get the object state for binding.

Method Detail

getStateToBind

public Object getStateToBind(Object obj, Name name, Context nameCtx, Hashtable<?,?> environment)
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 DirectoryManager