Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The HTTP resource and the related File Backed HTTP Resource allow configuration to be retrieved from an web server. In contrast to the Spring UrlResource, significant control of the underlying Apache HttpClient library is available, such as:

  • Connection timeouts and other connection-related configuration.

  • Proxy information

  • In-memory or file backed caching. This caching is at the HTTP client level and allows a reduction of the HTTP traffic since data is only loaded when it has gone out of date. However, these caches do not survive the lifetime of the HttpClient, and so are not available across IdP restarts, so they are generally not of a lot of value.

For details on some advanced usage, refer to the HttpClientConfiguration topic.

...

The HTTP Resource is configured entirely via its constructor.  The two parameters are the URL and an Apache HttpClient. Some built-in beans are provided to simplify use of the HttpClient, configured via properties detailed in the HttpClientConfiguration topic.

FileBackedHTTPResource provides file backup for when the web server is unavailable, including across restarts. Note that this use case is orthogonal to the use of a file-backed HttpClient cache, which provides a local copy of valid cached data even when the web server can be contacted.

...