Class MLApiRootBuilder
java.lang.Object
com.commercetools.ml.defaultconfig.MLApiRootBuilder
-
Method Summary
Modifier and TypeMethodDescriptionaddCorrelationIdProvider(io.vrap.rmf.base.client.http.CorrelationIdProvider correlationIdProvider) addMiddleware(io.vrap.rmf.base.client.http.Middleware middleware, io.vrap.rmf.base.client.http.Middleware... middlewares) addMiddlewares(List<io.vrap.rmf.base.client.http.Middleware> middlewares) build()io.vrap.rmf.base.client.ApiHttpClientbuildForProject(String projectKey) Deprecated.buildProjectRoot(String projectKey) Deprecated.usebuild(String)insteadSupplier<io.vrap.rmf.base.client.ApiHttpClient>defaultClient(io.vrap.rmf.base.client.oauth2.ClientCredentials credentials) defaultClient(io.vrap.rmf.base.client.oauth2.ClientCredentials credentials, io.vrap.rmf.base.client.ServiceRegionConfig serviceRegion) defaultClient(io.vrap.rmf.base.client.oauth2.ClientCredentials credentials, String tokenEndpoint, String apiEndpoint) defaultClient(String apiEndpoint) defaultClient(String apiEndpoint, io.vrap.rmf.base.client.oauth2.ClientCredentials credentials, String tokenEndpoint) defaultClient(URI apiEndpoint) static MLApiRootBuilderof()static MLApiRootBuilderof(io.vrap.rmf.base.client.http.HandlerStack stack) static MLApiRootBuilderof(io.vrap.rmf.base.client.VrapHttpClient httpClient) with(UnaryOperator<io.vrap.rmf.base.client.ClientBuilder> builderUnaryOperator) withAnonymousSessionFlow(io.vrap.rmf.base.client.oauth2.ClientCredentials credentials, String tokenEndpoint) withAnonymousSessionFlow(io.vrap.rmf.base.client.oauth2.ClientCredentials credentials, String tokenEndpoint, io.vrap.rmf.base.client.VrapHttpClient httpClient) withApiBaseUrl(String apiBaseUrl) withApiBaseUrl(URI apiBaseUrl) withAuthRetries(int authRetries) withClientCredentialsFlow(io.vrap.rmf.base.client.oauth2.ClientCredentials credentials, String tokenEndpoint) withClientCredentialsFlow(io.vrap.rmf.base.client.oauth2.ClientCredentials credentials, String tokenEndpoint, io.vrap.rmf.base.client.VrapHttpClient httpClient) withClientCredentialsFlow(io.vrap.rmf.base.client.oauth2.ClientCredentials credentials, URI tokenEndpoint) withClientCredentialsFlow(io.vrap.rmf.base.client.oauth2.ClientCredentials credentials, URI tokenEndpoint, io.vrap.rmf.base.client.VrapHttpClient httpClient) withErrorMiddleware(io.vrap.rmf.base.client.http.ErrorMiddleware errorMiddleware) withGlobalCustomerPasswordFlow(io.vrap.rmf.base.client.oauth2.ClientCredentials credentials, String email, String password, String tokenEndpoint) withGlobalCustomerPasswordFlow(io.vrap.rmf.base.client.oauth2.ClientCredentials credentials, String email, String password, String tokenEndpoint, io.vrap.rmf.base.client.VrapHttpClient httpClient) withHandlerStack(io.vrap.rmf.base.client.http.HandlerStack stack) withHttpClient(io.vrap.rmf.base.client.VrapHttpClient httpClient) withHttpExceptionFactory(io.vrap.rmf.base.client.error.HttpExceptionFactory factory) withHttpExceptionFactory(Function<io.vrap.rmf.base.client.ResponseSerializer, io.vrap.rmf.base.client.error.HttpExceptionFactory> factory) withHttpExceptionFactory(Supplier<io.vrap.rmf.base.client.error.HttpExceptionFactory> factory) withInternalLoggerFactory(io.vrap.rmf.base.client.http.InternalLoggerFactory internalLoggerFactory) withInternalLoggerFactory(io.vrap.rmf.base.client.http.InternalLoggerFactory internalLoggerFactory, org.slf4j.event.Level responseLogEvent, org.slf4j.event.Level deprecationLogEvent) withInternalLoggerFactory(io.vrap.rmf.base.client.http.InternalLoggerFactory internalLoggerFactory, org.slf4j.event.Level responseLogEvent, org.slf4j.event.Level deprecationLogEvent, org.slf4j.event.Level defaultExceptionLogEvent, Map<Class<? extends Throwable>, org.slf4j.event.Level> exceptionLogEvents) withInternalLoggerMiddleware(io.vrap.rmf.base.client.http.InternalLoggerMiddleware internalLoggerMiddleware) withMiddleware(io.vrap.rmf.base.client.http.Middleware middleware, io.vrap.rmf.base.client.http.Middleware... middlewares) withMiddlewares(List<io.vrap.rmf.base.client.http.Middleware> middlewares) withOAuthMiddleware(io.vrap.rmf.base.client.http.OAuthMiddleware oAuthMiddleware) withOAuthMiddleware(Supplier<io.vrap.rmf.base.client.http.OAuthMiddleware> oAuthMiddleware) withQueueMiddleware(int maxRequests, Duration maxWaitTime) withQueueMiddleware(dev.failsafe.spi.Scheduler scheduler, int maxRequests, Duration maxWaitTime) withQueueMiddleware(io.vrap.rmf.base.client.http.QueueRequestMiddleware queueMiddleware) withQueueMiddleware(ExecutorService executorService, int maxRequests, Duration maxWaitTime) withQueueMiddleware(ScheduledExecutorService executorService, int maxRequests, Duration maxWaitTime) withQueueMiddleware(Supplier<io.vrap.rmf.base.client.http.QueueRequestMiddleware> queueMiddleware) withRetryMiddleware(int maxRetries) withRetryMiddleware(int maxRetries, long delay, long maxDelay, io.vrap.rmf.base.client.http.FailsafeRetryPolicyBuilderOptions fn) withRetryMiddleware(int maxRetries, long delay, long maxDelay, List<Integer> statusCodes, List<Class<? extends Throwable>> failures, io.vrap.rmf.base.client.http.FailsafeRetryPolicyBuilderOptions fn) withRetryMiddleware(int maxRetries, List<Integer> statusCodes) withRetryMiddleware(int maxRetries, List<Integer> statusCodes, List<Class<? extends Throwable>> failures) withRetryMiddleware(io.vrap.rmf.base.client.http.RetryRequestMiddleware retryMiddleware) withRetryMiddleware(Supplier<io.vrap.rmf.base.client.http.RetryRequestMiddleware> retryMiddleware) withSerializer(io.vrap.rmf.base.client.ResponseSerializer serializer) withSerializer(Supplier<io.vrap.rmf.base.client.ResponseSerializer> serializer) withStaticTokenFlow(io.vrap.rmf.base.client.AuthenticationToken token) withTokenSupplier(io.vrap.rmf.base.client.oauth2.TokenSupplier tokenSupplier) withTokenSupplier(Supplier<io.vrap.rmf.base.client.oauth2.TokenSupplier> tokenSupplier) withUserAgentSupplier(Supplier<String> userAgentSupplier)
-
Method Details
-
of
-
of
-
of
-
withAuthCircuitBreaker
-
withoutAuthCircuitBreaker
-
withAuthRetries
-
withHandlerStack
-
withHttpClient
-
withSerializer
-
withSerializer
public MLApiRootBuilder withSerializer(Supplier<io.vrap.rmf.base.client.ResponseSerializer> serializer) -
withHttpExceptionFactory
public MLApiRootBuilder withHttpExceptionFactory(io.vrap.rmf.base.client.error.HttpExceptionFactory factory) -
withHttpExceptionFactory
public MLApiRootBuilder withHttpExceptionFactory(Function<io.vrap.rmf.base.client.ResponseSerializer, io.vrap.rmf.base.client.error.HttpExceptionFactory> factory) -
withHttpExceptionFactory
public MLApiRootBuilder withHttpExceptionFactory(Supplier<io.vrap.rmf.base.client.error.HttpExceptionFactory> factory) -
defaultClient
-
defaultClient
public MLApiRootBuilder defaultClient(io.vrap.rmf.base.client.oauth2.ClientCredentials credentials, io.vrap.rmf.base.client.ServiceRegionConfig serviceRegion) -
defaultClient
public MLApiRootBuilder defaultClient(io.vrap.rmf.base.client.oauth2.ClientCredentials credentials, String tokenEndpoint, String apiEndpoint) -
defaultClient
public MLApiRootBuilder defaultClient(String apiEndpoint, io.vrap.rmf.base.client.oauth2.ClientCredentials credentials, String tokenEndpoint) -
defaultClient
-
defaultClient
-
withClientCredentialsFlow
public MLApiRootBuilder withClientCredentialsFlow(io.vrap.rmf.base.client.oauth2.ClientCredentials credentials, String tokenEndpoint) -
withClientCredentialsFlow
public MLApiRootBuilder withClientCredentialsFlow(io.vrap.rmf.base.client.oauth2.ClientCredentials credentials, String tokenEndpoint, io.vrap.rmf.base.client.VrapHttpClient httpClient) -
withClientCredentialsFlow
public MLApiRootBuilder withClientCredentialsFlow(io.vrap.rmf.base.client.oauth2.ClientCredentials credentials, URI tokenEndpoint) -
withClientCredentialsFlow
public MLApiRootBuilder withClientCredentialsFlow(io.vrap.rmf.base.client.oauth2.ClientCredentials credentials, URI tokenEndpoint, io.vrap.rmf.base.client.VrapHttpClient httpClient) -
withStaticTokenFlow
-
withAnonymousSessionFlow
public MLApiRootBuilder withAnonymousSessionFlow(io.vrap.rmf.base.client.oauth2.ClientCredentials credentials, String tokenEndpoint) -
withAnonymousSessionFlow
public MLApiRootBuilder withAnonymousSessionFlow(io.vrap.rmf.base.client.oauth2.ClientCredentials credentials, String tokenEndpoint, io.vrap.rmf.base.client.VrapHttpClient httpClient) -
withGlobalCustomerPasswordFlow
public MLApiRootBuilder withGlobalCustomerPasswordFlow(io.vrap.rmf.base.client.oauth2.ClientCredentials credentials, String email, String password, String tokenEndpoint) -
withGlobalCustomerPasswordFlow
public MLApiRootBuilder withGlobalCustomerPasswordFlow(io.vrap.rmf.base.client.oauth2.ClientCredentials credentials, String email, String password, String tokenEndpoint, io.vrap.rmf.base.client.VrapHttpClient httpClient) -
addAcceptGZipMiddleware
-
withErrorMiddleware
-
withErrorMiddleware
public MLApiRootBuilder withErrorMiddleware(io.vrap.rmf.base.client.http.ErrorMiddleware errorMiddleware) -
withRetryMiddleware
public MLApiRootBuilder withRetryMiddleware(Supplier<io.vrap.rmf.base.client.http.RetryRequestMiddleware> retryMiddleware) -
withRetryMiddleware
public MLApiRootBuilder withRetryMiddleware(io.vrap.rmf.base.client.http.RetryRequestMiddleware retryMiddleware) -
withRetryMiddleware
-
withRetryMiddleware
-
withRetryMiddleware
-
withRetryMiddleware
-
withRetryMiddleware
public MLApiRootBuilder withRetryMiddleware(int maxRetries, long delay, long maxDelay, io.vrap.rmf.base.client.http.FailsafeRetryPolicyBuilderOptions fn) -
withQueueMiddleware
public MLApiRootBuilder withQueueMiddleware(Supplier<io.vrap.rmf.base.client.http.QueueRequestMiddleware> queueMiddleware) -
withQueueMiddleware
public MLApiRootBuilder withQueueMiddleware(io.vrap.rmf.base.client.http.QueueRequestMiddleware queueMiddleware) -
withQueueMiddleware
-
withQueueMiddleware
public MLApiRootBuilder withQueueMiddleware(dev.failsafe.spi.Scheduler scheduler, int maxRequests, Duration maxWaitTime) -
withQueueMiddleware
public MLApiRootBuilder withQueueMiddleware(ScheduledExecutorService executorService, int maxRequests, Duration maxWaitTime) -
withQueueMiddleware
public MLApiRootBuilder withQueueMiddleware(ExecutorService executorService, int maxRequests, Duration maxWaitTime) -
withOAuthMiddleware
public MLApiRootBuilder withOAuthMiddleware(Supplier<io.vrap.rmf.base.client.http.OAuthMiddleware> oAuthMiddleware) -
withOAuthMiddleware
public MLApiRootBuilder withOAuthMiddleware(io.vrap.rmf.base.client.http.OAuthMiddleware oAuthMiddleware) -
withTokenSupplier
public MLApiRootBuilder withTokenSupplier(io.vrap.rmf.base.client.oauth2.TokenSupplier tokenSupplier) -
withTokenSupplier
public MLApiRootBuilder withTokenSupplier(Supplier<io.vrap.rmf.base.client.oauth2.TokenSupplier> tokenSupplier) -
withInternalLoggerMiddleware
public MLApiRootBuilder withInternalLoggerMiddleware(io.vrap.rmf.base.client.http.InternalLoggerMiddleware internalLoggerMiddleware) -
withInternalLoggerFactory
public MLApiRootBuilder withInternalLoggerFactory(io.vrap.rmf.base.client.http.InternalLoggerFactory internalLoggerFactory) -
withInternalLoggerFactory
public MLApiRootBuilder withInternalLoggerFactory(io.vrap.rmf.base.client.http.InternalLoggerFactory internalLoggerFactory, org.slf4j.event.Level responseLogEvent, org.slf4j.event.Level deprecationLogEvent) -
withInternalLoggerFactory
public MLApiRootBuilder withInternalLoggerFactory(io.vrap.rmf.base.client.http.InternalLoggerFactory internalLoggerFactory, org.slf4j.event.Level responseLogEvent, org.slf4j.event.Level deprecationLogEvent, org.slf4j.event.Level defaultExceptionLogEvent, Map<Class<? extends Throwable>, org.slf4j.event.Level> exceptionLogEvents) -
withApiBaseUrl
-
withApiBaseUrl
-
withUserAgentSupplier
-
addCorrelationIdProvider
public MLApiRootBuilder addCorrelationIdProvider(@Nullable io.vrap.rmf.base.client.http.CorrelationIdProvider correlationIdProvider) -
withMiddleware
public MLApiRootBuilder withMiddleware(io.vrap.rmf.base.client.http.Middleware middleware, io.vrap.rmf.base.client.http.Middleware... middlewares) -
addMiddleware
public MLApiRootBuilder addMiddleware(io.vrap.rmf.base.client.http.Middleware middleware, io.vrap.rmf.base.client.http.Middleware... middlewares) -
withMiddlewares
-
addMiddlewares
-
with
public MLApiRootBuilder with(UnaryOperator<io.vrap.rmf.base.client.ClientBuilder> builderUnaryOperator) -
build
-
buildClient
public io.vrap.rmf.base.client.ApiHttpClient buildClient() -
clientSupplier
-
buildForProject
Deprecated.usebuild(String)instead -
buildProjectRoot
Deprecated.usebuild(String)instead -
build
-
build(String)instead