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 Details

    • 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

      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

      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

      Gets the headers to set for the HTTP request.
      Returns:
      The HTTP headers as name - values map, null if 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, null if none.