use of com.hotels.styx.api.configuration.ServiceFactory in project styx by ExpediaGroup.
the class ServiceProvision method loadSpiExtension.
private static <T> T loadSpiExtension(SpiExtension factoryConfig, Environment environment, Class<T> serviceSuperclass) {
ServiceFactory factory = newServiceFactory(factoryConfig);
JsonNodeConfig config = new JsonNodeConfig(factoryConfig.config());
return serviceSuperclass.cast(factory.create(environment, config));
}
use of com.hotels.styx.api.configuration.ServiceFactory in project styx by ExpediaGroup.
the class ServiceProvision method loadServiceFactory.
private static <T> T loadServiceFactory(ServiceFactoryConfig serviceFactoryConfig, Environment environment, Class<T> serviceSuperclass) {
ServiceFactory factory = newInstance(serviceFactoryConfig.factory(), ServiceFactory.class);
JsonNodeConfig config = serviceFactoryConfig.config();
return serviceSuperclass.cast(factory.create(environment, config));
}
Aggregations