no.nav.registre.testnorge.consumers.ConsumerFactory Maven / Gradle / Ivy
package no.nav.registre.testnorge.consumers;
import org.springframework.web.client.RestTemplate;
import no.nav.registre.testnorge.consumers.hodejegeren.HodejegerenConsumer;
public class ConsumerFactory {
public static Consumer create(Class clazz, RestTemplate restTemplate) {
if (clazz == HodejegerenConsumer.class) {
return new HodejegerenConsumer("https://testnorge-hodejegeren.nais.preprod.local/api", restTemplate);
} else {
throw new IllegalStateException("Unexpected value: " + clazz.getName());
}
}
}