javadoc for how to use this factory with Spring bean configuration