Package io.vrap.rmf.base.client.http
Class OAuthMiddlewareImpl
java.lang.Object
io.vrap.rmf.base.client.http.OAuthMiddlewareImpl
- All Implemented Interfaces:
Middleware
,OAuthMiddleware
,AutoCloseable
Default implementation for the
OAuthMiddleware
with automatic retry upon expired access-
Constructor Summary
ConstructorDescriptionOAuthMiddlewareImpl
(dev.failsafe.spi.Scheduler scheduler, OAuthHandler oauthHandler, int maxRetries, boolean useCircuitBreaker) OAuthMiddlewareImpl
(OAuthHandler oAuthHandler) OAuthMiddlewareImpl
(OAuthHandler oauthHandler, int maxRetries, boolean useCircuitBreaker) OAuthMiddlewareImpl
(ExecutorService executor, OAuthHandler oauthHandler, int maxRetries, boolean useCircuitBreaker) OAuthMiddlewareImpl
(ScheduledExecutorService executorService, OAuthHandler oauthHandler, int maxRetries, boolean useCircuitBreaker) -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
CompletableFuture<ApiHttpResponse<byte[]>>
invoke
(ApiHttpRequest request, Function<ApiHttpRequest, CompletableFuture<ApiHttpResponse<byte[]>>> next)
-
Constructor Details
-
OAuthMiddlewareImpl
-
OAuthMiddlewareImpl
-
OAuthMiddlewareImpl
public OAuthMiddlewareImpl(ScheduledExecutorService executorService, OAuthHandler oauthHandler, int maxRetries, boolean useCircuitBreaker) -
OAuthMiddlewareImpl
public OAuthMiddlewareImpl(ExecutorService executor, OAuthHandler oauthHandler, int maxRetries, boolean useCircuitBreaker) -
OAuthMiddlewareImpl
public OAuthMiddlewareImpl(dev.failsafe.spi.Scheduler scheduler, OAuthHandler oauthHandler, int maxRetries, boolean useCircuitBreaker)
-
-
Method Details
-
invoke
public CompletableFuture<ApiHttpResponse<byte[]>> invoke(ApiHttpRequest request, Function<ApiHttpRequest, CompletableFuture<ApiHttpResponse<byte[]>>> next) - Specified by:
invoke
in interfaceMiddleware
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
-