Package com.oracle.bmc.util.internal
Class RefreshAuthTokenTransformingFuture<FROM,TO>
- java.lang.Object
-
- com.oracle.bmc.util.internal.RefreshAuthTokenTransformingFuture<FROM,TO>
-
- Type Parameters:
FROM
- The type returned by the delegate Future.TO
- The type to convert to.
- All Implemented Interfaces:
Future<TO>
public class RefreshAuthTokenTransformingFuture<FROM,TO> extends Object implements Future<TO>
Deprecated.in favor of RefreshAuthTokenWrapper – versions after 1.25.1 do not use RefreshAuthTokenTransformingFuture anymoreFuture that both delegates to another one and provides the ability to transform the response to another type.This is intended to work with some authenticated calls, like instance principals, and has handling so that if we receive a 401, we’ll refresh the auth token and then try again.
This is to account for scenarios where we have a valid/non-expired token but the permissions for the instance have changed since the token was issued and so on the server-side the presented token is considered invalid.
-
-
Constructor Summary
Constructors Constructor Description RefreshAuthTokenTransformingFuture(Future<FROM> delegate, Function<FROM,TO> transformer, RefreshableOnNotAuthenticatedProvider<?> authProvider, Supplier<Future<FROM>> generateNewFutureForRetry)
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
cancel(boolean mayInterruptIfRunning)
Deprecated.TO
get()
Deprecated.TO
get(long timeout, TimeUnit unit)
Deprecated.boolean
isCancelled()
Deprecated.boolean
isDone()
Deprecated.
-
-
-
Method Detail
-
cancel
public boolean cancel(boolean mayInterruptIfRunning)
Deprecated.
-
isCancelled
public boolean isCancelled()
Deprecated.- Specified by:
isCancelled
in interfaceFuture<FROM>
-
get
public TO get() throws InterruptedException, ExecutionException
Deprecated.- Specified by:
get
in interfaceFuture<FROM>
- Throws:
InterruptedException
ExecutionException
-
get
public TO get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
Deprecated.- Specified by:
get
in interfaceFuture<FROM>
- Throws:
InterruptedException
ExecutionException
TimeoutException
-
-