001package com.nimbusds.oauth2.sdk.http; 002 003 004/** 005 * Retriever of resources specified by URL which permits setting of HTTP 006 * connect and read timeouts as well as a size limit. 007 */ 008@Deprecated 009public interface RestrictedResourceRetriever extends ResourceRetriever { 010 011 012 /** 013 * Gets the HTTP connect timeout. 014 * 015 * @return The HTTP connect timeout, in milliseconds, zero for 016 * infinite. 017 */ 018 int getConnectTimeout(); 019 020 021 /** 022 * Sets the HTTP connect timeout. 023 * 024 * @param connectTimeoutMs The HTTP connect timeout, in milliseconds, 025 * zero for infinite. Must not be negative. 026 */ 027 void setConnectTimeout(final int connectTimeoutMs); 028 029 030 /** 031 * Gets the HTTP read timeout. 032 * 033 * @return The HTTP read timeout, in milliseconds, zero for infinite. 034 */ 035 int getReadTimeout(); 036 037 038 /** 039 * Sets the HTTP read timeout. 040 * 041 * @param readTimeoutMs The HTTP read timeout, in milliseconds, zero 042 * for infinite. Must not be negative. 043 */ 044 void setReadTimeout(final int readTimeoutMs); 045 046 047 /** 048 * Gets the HTTP entity size limit. 049 * 050 * @return The HTTP entity size limit, in bytes, zero for infinite. 051 */ 052 int getSizeLimit(); 053 054 055 /** 056 * Sets the HTTP entity size limit. 057 * 058 * @param sizeLimitBytes The HTTP entity size limit, in bytes, zero for 059 * infinite. Must not be negative. 060 */ 061 void setSizeLimit(int sizeLimitBytes); 062}