use of org.shredzone.acme4j.Metadata in project webpieces by deanhiller.
the class AcmeClientProxy method fetchRemoteInfo.
// TODO: Put the remote request INTO a different pool to not hold up the webserver main
// threadpool so only synchronous requests will hold up synchronous requests
public XFuture<AcmeInfo> fetchRemoteInfo() {
try {
Session session = new Session(config.getProviderLocation());
Metadata metadata = session.getMetadata();
URI termsOfServiceUri = metadata.getTermsOfService();
URL website = metadata.getWebsite();
return XFuture.completedFuture(new AcmeInfo(termsOfServiceUri, website));
} catch (AcmeException e) {
throw SneakyThrow.sneak(e);
}
}
Aggregations