A characterization of simplicial localization functors