Class FileCachingHttpClientBuilder.StorageManagingHttpClient

java.lang.Object
net.shibboleth.shared.httpclient.AbstractHttpClient
net.shibboleth.shared.httpclient.FileCachingHttpClientBuilder.StorageManagingHttpClient
All Implemented Interfaces:
Closeable, AutoCloseable, Component, DestructableComponent, InitializableComponent, org.apache.hc.client5.http.classic.HttpClient, org.apache.hc.core5.io.ModalCloseable
Enclosing class:
FileCachingHttpClientBuilder

private static class FileCachingHttpClientBuilder.StorageManagingHttpClient extends AbstractHttpClient implements InitializableComponent, DestructableComponent
Class which wraps a caching instance of HttpClient and its associated ManagedHttpCacheStorage, and manages the scheduled maintenance and lifecycle of the latter.
  • Field Details

    • log

      @Nonnull private org.slf4j.Logger log
      Logger.
    • httpClient

      @NonnullAfterInit private org.apache.hc.client5.http.classic.HttpClient httpClient
      The wrapped HttpClient instance.
    • storage

      @NonnullAfterInit private org.apache.hc.client5.http.impl.cache.ManagedHttpCacheStorage storage
      The cache storage instance to manage.
    • maintenanceTaskInterval

      private long maintenanceTaskInterval
      Interval of the scheduled maintenance task.
    • initialized

      private boolean initialized
      Initialized flag.
    • destroyed

      private boolean destroyed
      Destroyed flag.
    • timer

      @NonnullAfterInit private Timer timer
      Scheduled task timer.
    • maintenanceTask

      @NonnullAfterInit private TimerTask maintenanceTask
      The scheduled storage maintenance task.
  • Constructor Details

    • StorageManagingHttpClient

      public StorageManagingHttpClient(@Nonnull org.apache.hc.client5.http.classic.HttpClient wrappedClient, @Nonnull org.apache.hc.client5.http.impl.cache.ManagedHttpCacheStorage managedStorage, long taskInterval)
      Constructor.
      Parameters:
      wrappedClient - the wrapped HttpClient instance
      managedStorage - the managed cache storage instance
      taskInterval - the interval at which storage maintenance should run
  • Method Details