Package com.nimbusds.jose.util
Interface RestrictedResourceRetriever
- All Superinterfaces:
ResourceRetriever
- All Known Implementing Classes:
AbstractRestrictedResourceRetriever,DefaultResourceRetriever
Retriever of resources specified by URL which permits setting of HTTP
connect and read timeouts, size limit and headers.
-
Method Summary
Modifier and TypeMethodDescriptionintGets the HTTP connect timeout.Gets the headers to set for the HTTP request.intGets the HTTP read timeout.intGets 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 Details
-
getConnectTimeout
int getConnectTimeout()Gets the HTTP connect timeout.- Returns:
- The HTTP connect timeout, in milliseconds, zero for infinite.
-
setConnectTimeout
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
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
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
Sets the headers to set for the HTTP request.- Parameters:
headers- The HTTP headers as name - values map,nullif none.
-