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 * 011 * @author Vladimir Dzhuvinov 012 */ 013public interface ResourceRetriever { 014 015 016 /** 017 * Retrieves the resource from the specified HTTP(S) URL. 018 * 019 * @param url The URL of the resource. Its scheme must be HTTP or 020 * HTTPS. Must not be {@code null}. 021 * 022 * @return The retrieved resource. 023 * 024 * @throws IOException If the HTTP connection to the specified URL 025 * failed or the resource couldn't be retrieved. 026 */ 027 public Resource retrieveResource(final URL url) 028 throws IOException; 029}