public static class DefaultCredentialsRefreshService.DefaultCredentialsRefreshServiceBuilder extends Object
DefaultCredentialsRefreshService.DefaultCredentialsRefreshServiceBuilder
.Constructor and Description |
---|
DefaultCredentialsRefreshServiceBuilder() |
Modifier and Type | Method and Description |
---|---|
DefaultCredentialsRefreshService.DefaultCredentialsRefreshServiceBuilder |
approachingExpirationStrategy(Function<Duration,Boolean> approachingExpirationStrategy)
Set the strategy to trigger an early refresh before attempting to connect.
|
DefaultCredentialsRefreshService |
build()
Create the
DefaultCredentialsRefreshService instance. |
DefaultCredentialsRefreshService.DefaultCredentialsRefreshServiceBuilder |
refreshDelayStrategy(Function<Duration,Duration> refreshDelayStrategy)
Set the strategy to schedule credentials refresh after credentials retrieval.
|
DefaultCredentialsRefreshService.DefaultCredentialsRefreshServiceBuilder |
scheduler(ScheduledThreadPoolExecutor scheduler) |
public DefaultCredentialsRefreshServiceBuilder()
public DefaultCredentialsRefreshService.DefaultCredentialsRefreshServiceBuilder scheduler(ScheduledThreadPoolExecutor scheduler)
public DefaultCredentialsRefreshService.DefaultCredentialsRefreshServiceBuilder refreshDelayStrategy(Function<Duration,Duration> refreshDelayStrategy)
Default is a 80 % ratio-based strategy (refresh is scheduled after 80 % of the time before expiration, e.g. 48 minutes for a token with a validity of 60 minutes, that is refresh will be scheduled 12 minutes before the token actually expires).
refreshDelayStrategy
- DefaultCredentialsRefreshService.refreshDelayStrategy
,
DefaultCredentialsRefreshService.ratioRefreshDelayStrategy(double)
public DefaultCredentialsRefreshService.DefaultCredentialsRefreshServiceBuilder approachingExpirationStrategy(Function<Duration,Boolean> approachingExpirationStrategy)
Default is to never advise to refresh before connecting.
approachingExpirationStrategy
- DefaultCredentialsRefreshService.approachingExpirationStrategy
,
CredentialsRefreshService.isApproachingExpiration(Duration)
public DefaultCredentialsRefreshService build()
DefaultCredentialsRefreshService
instance.Copyright © 2022 VMware, Inc. or its affiliates.. All rights reserved.