Class ContextMapperCallbackHandler<T>

    • Constructor Detail

      • ContextMapperCallbackHandler

        public ContextMapperCallbackHandler​(ContextMapper<T> mapper)
        Constructs a new instance wrapping the supplied ContextMapper.
        Parameters:
        mapper - the mapper to be called for each entry.
    • Method Detail

      • getObjectFromNameClassPair

        public T getObjectFromNameClassPair​(javax.naming.NameClassPair nameClassPair)
                                     throws javax.naming.NamingException
        Cast the NameClassPair to a Binding and pass its object to the ContextMapper.
        Specified by:
        getObjectFromNameClassPair in class CollectingNameClassPairCallbackHandler<T>
        Parameters:
        nameClassPair - a Binding instance.
        Returns:
        the Object returned from the mapper.
        Throws:
        javax.naming.NamingException - if an error occurs.
        ObjectRetrievalException - if the object of the nameClassPair is null.