All Downloads are FREE. Search and download functionalities are using the official Maven repository.

rpc.turbo.config.client.ClientConfig Maven / Gradle / Ivy

The newest version!
package rpc.turbo.config.client;

import java.util.List;

import com.typesafe.config.Config;
import com.typesafe.config.ConfigFactory;

public class ClientConfig {
	private List appConfigList;

	public List getAppConfigList() {
		return appConfigList;
	}

	public void setAppConfigList(List appConfigList) {
		this.appConfigList = appConfigList;
	}

	@Override
	public String toString() {
		return "ClientConfig{" + "appConfigList=" + appConfigList + '}';
	}

	public static ClientConfig parse(String resourceName) {

		ClientConfig clientConfig = new ClientConfig();

		Config config = ConfigFactory.load(resourceName);

		List appConfigList = AppConfig.parse(config.getConfigList("apps"));

		clientConfig.setAppConfigList(appConfigList);

		return clientConfig;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy