001package com.nimbusds.openid.connect.sdk.util; 002 003 004import java.io.IOException; 005import java.net.URL; 006 007 008/** 009 * Retriever of resources specified by URL. 010 */ 011public interface ResourceRetriever { 012 013 014 /** 015 * Retrieves the resource from the specified HTTP(S) URL. 016 * 017 * @param url The URL of the resource. Its scheme must be HTTP or 018 * HTTPS. Must not be {@code null}. 019 * 020 * @return The retrieved resource. 021 * 022 * @throws IOException If the HTTP connection to the specified URL 023 * failed or the resource couldn't be retrieved. 024 */ 025 public Resource retrieveResource(final URL url) 026 throws IOException; 027}