use of org.finos.symphony.toolkit.spring.api.properties.ProxyProperties in project spring-bot by finos.
the class PodInfoStoreTokenStrategy method setupApiBuilder.
private ApiBuilder setupApiBuilder(PodInfo pod, String url) throws Exception {
ConfigurableApiBuilder ab = abf.getObject();
ab.setUrl(url);
ab.setKeyManagers(appIdentity.getKeyManagers());
ab.setTrustManagers(trustManagers);
if (pod.getUseProxy() != Boolean.FALSE) {
ProxyProperties proxy = appProperties.getProxy();
if (proxy != null) {
proxy.configure(ab);
}
}
return ab;
}
use of org.finos.symphony.toolkit.spring.api.properties.ProxyProperties in project spring-bot by finos.
the class FeedLoader method createFeed.
public Feed createFeed(String url, String name) throws FeedException {
Exception last = null;
for (ProxyProperties proxyProperties : pp) {
try {
SyndFeedInput input = new SyndFeedInput();
input.setAllowDoctypes(true);
SyndFeed feed = input.build(new XmlReader(downloadContent(url, proxyProperties)));
Feed f = new Feed();
if (!StringUtils.hasText(name)) {
f.setName(feed.getTitle());
} else {
f.setName(name);
}
f.setDescription(feed.getDescription());
f.setUrl(url);
f.setProxy(proxyProperties);
return f;
} catch (Exception e) {
LOG.info("Couldn't get feed " + url + " with " + proxyProperties.getHost());
last = e;
}
}
throw new FeedException("Couldn't download feed with any proxy", last);
}
Aggregations