class SessionSettingsLocator {

	public static SessionSettings loadSettings(String... locations) {

		try {
			for (String location : locations) {
				Optional<Resource> resource = load(location);

				if (resource.isPresent()) {
					log.info("Loading settings from '{}'", location);

					return new SessionSettings(resource.get().getInputStream());
				}
			}

			throw new SettingsNotFoundException("Settings file not found");
		} catch (RuntimeException | ConfigError | IOException e) {
			throw new SettingsNotFoundException(e.getMessage(), e);
		}
	}

	private  SessionSettingsLocator();

}