Search in sources :

Example 1 with Metadata

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);
    }
}
Also used : AcmeException(org.shredzone.acme4j.exception.AcmeException) Metadata(org.shredzone.acme4j.Metadata) URI(java.net.URI) URL(java.net.URL) Session(org.shredzone.acme4j.Session)

Aggregations

URI (java.net.URI)1 URL (java.net.URL)1 Metadata (org.shredzone.acme4j.Metadata)1 Session (org.shredzone.acme4j.Session)1 AcmeException (org.shredzone.acme4j.exception.AcmeException)1