Package io.deephaven.enterprise.auth
Interface TokenFactoryFactory.TokenFactory
- All Known Implementing Classes:
AuthenticationClientManagerBase.SingleClientTokenFactory
,AuthenticationClientManagerBase.TokenFactoryBase
- Enclosing interface:
- TokenFactoryFactory
public static interface TokenFactoryFactory.TokenFactory
TokenFactory allows to execute actions with a transient token. It requests the token for its caller, and then
performs the action provided with it.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
void
tryActionUntil
(Predicate<AuthToken> action) void
tryActionWithToken
(Consumer<AuthToken> action) default <R> R
tryGetWithToken
(Function<AuthToken, R> action) default <R> R
tryGetWithToken
(Function<AuthToken, R> action, Predicate<Exception> isRetryablePred) default <R> R
tryGetWithTokenUsingStartedBackoff
(Function<AuthToken, R> action, RetryBackoffContext backoffContext) <R> R
tryGetWithTokenUsingStartedBackoff
(Function<AuthToken, R> action, Predicate<Exception> isRetryablePred, RetryBackoffContext backoffContext) Try to get the result of action, retrying each time there is a recoverable exception.
-
Method Details
-
tryGetWithTokenUsingStartedBackoff
<R> R tryGetWithTokenUsingStartedBackoff(Function<AuthToken, R> action, Predicate<Exception> isRetryablePred, RetryBackoffContext backoffContext) Try to get the result of action, retrying each time there is a recoverable exception. If any other exception is found it is rethrown.- Parameters:
action
- The action to attempt with a token- Throws:
AuthException
- if we hit the deadline for retrying.
-
tryGetWithTokenUsingStartedBackoff
default <R> R tryGetWithTokenUsingStartedBackoff(Function<AuthToken, R> action, RetryBackoffContext backoffContext) -
tryGetWithToken
-
tryGetWithToken
-
tryActionWithToken
-
tryActionUntil
-
isRetryable
-