Class CachedCredentialsProvider.CachedCredentialsProviderBuilder

  • Enclosing class:
    CachedCredentialsProvider

    public static class CachedCredentialsProvider.CachedCredentialsProviderBuilder
    extends java.lang.Object
    A simple builder class for a cached credentials provider and its options
    • Constructor Detail

      • CachedCredentialsProviderBuilder

        public CachedCredentialsProviderBuilder()
        Default constructor
    • Method Detail

      • withCachingDurationInSeconds

        public CachedCredentialsProvider.CachedCredentialsProviderBuilder withCachingDurationInSeconds​(int cachingDurationInSeconds)
        Sets the maximum caching duration for any credentials sourced through this provider. Depending on the wrapped provider's configuration, credentials may be sourced with shorter durations.
        Parameters:
        cachingDurationInSeconds - maximum caching duration in seconds of sourced credentials
        Returns:
        the provider builder
      • build

        public CachedCredentialsProvider build()
        Builds a new caching credentials provider
        Returns:
        the new credentials provider