Package com.nimbusds.jose.util
Interface RestrictedResourceRetriever
-
- All Superinterfaces:
ResourceRetriever
- All Known Implementing Classes:
AbstractRestrictedResourceRetriever,DefaultResourceRetriever
public interface RestrictedResourceRetriever extends ResourceRetriever
Retriever of resources specified by URL which permits setting of HTTP connect and read timeouts, size limit and headers.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intgetConnectTimeout()Gets the HTTP connect timeout.Map<String,List<String>>getHeaders()Gets the headers to set for the HTTP request.intgetReadTimeout()Gets the HTTP read timeout.intgetSizeLimit()Gets the HTTP entity size limit.voidsetConnectTimeout(int connectTimeoutMs)Sets the HTTP connect timeout.voidsetHeaders(Map<String,List<String>> headers)Sets the headers to set for the HTTP request.voidsetReadTimeout(int readTimeoutMs)Sets the HTTP read timeout.voidsetSizeLimit(int sizeLimitBytes)Sets the HTTP entity size limit.-
Methods inherited from interface com.nimbusds.jose.util.ResourceRetriever
retrieveResource
-
-
-
-
Method Detail
-
getConnectTimeout
int getConnectTimeout()
Gets the HTTP connect timeout.- Returns:
- The HTTP connect timeout, in milliseconds, zero for infinite.
-
setConnectTimeout
void setConnectTimeout(int connectTimeoutMs)
Sets the HTTP connect timeout.- Parameters:
connectTimeoutMs- The HTTP connect timeout, in milliseconds, zero for infinite. Must not be negative.
-
getReadTimeout
int getReadTimeout()
Gets the HTTP read timeout.- Returns:
- The HTTP read timeout, in milliseconds, zero for infinite.
-
setReadTimeout
void setReadTimeout(int readTimeoutMs)
Sets the HTTP read timeout.- Parameters:
readTimeoutMs- The HTTP read timeout, in milliseconds, zero for infinite. Must not be negative.
-
getSizeLimit
int getSizeLimit()
Gets the HTTP entity size limit.- Returns:
- The HTTP entity size limit, in bytes, zero for infinite.
-
setSizeLimit
void setSizeLimit(int sizeLimitBytes)
Sets the HTTP entity size limit.- Parameters:
sizeLimitBytes- The HTTP entity size limit, in bytes, zero for infinite. Must not be negative.
-
getHeaders
Map<String,List<String>> getHeaders()
Gets the headers to set for the HTTP request.- Returns:
- The HTTP headers as name - values map,
nullif not set.
-
setHeaders
void setHeaders(Map<String,List<String>> headers)
Sets the headers to set for the HTTP request.- Parameters:
headers- The HTTP headers as name - values map,nullif none.
-
-