public interface ContextMapper<T>
listBindingsoperations are automatically transformed to DirContext objects (when using the
DefaultDirObjectFactory- which is typically the case, unless something else has been explicitly specified - you get a
DirContextAdapterobject). This object will then be passed to the ContextMapper implementation for transformation to the desired bean.
ContextMapper implementations are typically stateless and thus reusable; they are ideal for implementing mapping logic in one place.
Alternatively, consider using an
AttributesMapper in stead.
T mapFromContext(Object ctx) throws NamingException
ctxis the object from a single
Binding, or a lookup operation.