All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.oracle.bmc.blockchain.BlockchainPlatformAsyncClient Maven / Gradle / Ivy

/**
 * Copyright (c) 2016, 2021, Oracle and/or its affiliates.  All rights reserved.
 * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
 */
package com.oracle.bmc.blockchain;

import com.oracle.bmc.blockchain.internal.http.*;
import com.oracle.bmc.blockchain.requests.*;
import com.oracle.bmc.blockchain.responses.*;

/**
 * Async client implementation for BlockchainPlatform service. 
* There are two ways to use async client: * 1. Use AsyncHandler: using AsyncHandler, if the response to the call is an {@link java.io.InputStream}, like * getObject Api in object storage service, developers need to process the stream in AsyncHandler, and not anywhere else, * because the stream will be closed right after the AsyncHandler is invoked.
* 2. Use Java Future: using Java Future, developers need to close the stream after they are done with the Java Future.
* Accessing the result should be done in a mutually exclusive manner, either through the Future or the AsyncHandler, * but not both. If the Future is used, the caller should pass in null as the AsyncHandler. If the AsyncHandler * is used, it is still safe to use the Future to determine whether or not the request was completed via * Future.isDone/isCancelled.
* Please refer to https://github.com/oracle/oci-java-sdk/blob/master/bmc-examples/src/main/java/ResteasyClientWithObjectStorageExample.java */ @javax.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20191010") @lombok.extern.slf4j.Slf4j public class BlockchainPlatformAsyncClient implements BlockchainPlatformAsync { /** * Service instance for BlockchainPlatform. */ public static final com.oracle.bmc.Service SERVICE = com.oracle.bmc.Services.serviceBuilder() .serviceName("BLOCKCHAINPLATFORM") .serviceEndpointPrefix("") .serviceEndpointTemplate("https://blockchain.{region}.oci.{secondLevelDomain}") .build(); @lombok.Getter(value = lombok.AccessLevel.PACKAGE) private final com.oracle.bmc.http.internal.RestClient client; private final com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider; private final org.glassfish.jersey.apache.connector.ApacheConnectionClosingStrategy apacheConnectionClosingStrategy; /** * Creates a new service instance using the given authentication provider. * @param authenticationDetailsProvider The authentication details provider, required. */ public BlockchainPlatformAsyncClient( com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider) { this(authenticationDetailsProvider, null); } /** * Creates a new service instance using the given authentication provider and client configuration. * @param authenticationDetailsProvider The authentication details provider, required. * @param configuration The client configuration, optional. */ public BlockchainPlatformAsyncClient( com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider, com.oracle.bmc.ClientConfiguration configuration) { this(authenticationDetailsProvider, configuration, null); } /** * Creates a new service instance using the given authentication provider and client configuration. Additionally, * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. * @param authenticationDetailsProvider The authentication details provider, required. * @param configuration The client configuration, optional. * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. */ public BlockchainPlatformAsyncClient( com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider, com.oracle.bmc.ClientConfiguration configuration, com.oracle.bmc.http.ClientConfigurator clientConfigurator) { this( authenticationDetailsProvider, configuration, clientConfigurator, new com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory( com.oracle.bmc.http.signing.SigningStrategy.STANDARD)); } /** * Creates a new service instance using the given authentication provider and client configuration. Additionally, * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. *

* This is an advanced constructor for clients that want to take control over how requests are signed. * @param authenticationDetailsProvider The authentication details provider, required. * @param configuration The client configuration, optional. * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. */ public BlockchainPlatformAsyncClient( com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, com.oracle.bmc.ClientConfiguration configuration, com.oracle.bmc.http.ClientConfigurator clientConfigurator, com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory) { this( authenticationDetailsProvider, configuration, clientConfigurator, defaultRequestSignerFactory, new java.util.ArrayList()); } /** * Creates a new service instance using the given authentication provider and client configuration. Additionally, * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. *

* This is an advanced constructor for clients that want to take control over how requests are signed. * @param authenticationDetailsProvider The authentication details provider, required. * @param configuration The client configuration, optional. * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. */ public BlockchainPlatformAsyncClient( com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, com.oracle.bmc.ClientConfiguration configuration, com.oracle.bmc.http.ClientConfigurator clientConfigurator, com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, java.util.List additionalClientConfigurators) { this( authenticationDetailsProvider, configuration, clientConfigurator, defaultRequestSignerFactory, additionalClientConfigurators, null); } /** * Creates a new service instance using the given authentication provider and client configuration. Additionally, * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. *

* This is an advanced constructor for clients that want to take control over how requests are signed. * @param authenticationDetailsProvider The authentication details provider, required. * @param configuration The client configuration, optional. * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) */ public BlockchainPlatformAsyncClient( com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, com.oracle.bmc.ClientConfiguration configuration, com.oracle.bmc.http.ClientConfigurator clientConfigurator, com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, java.util.List additionalClientConfigurators, String endpoint) { this( authenticationDetailsProvider, configuration, clientConfigurator, defaultRequestSignerFactory, com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory .createDefaultRequestSignerFactories(), additionalClientConfigurators, endpoint); } /** * Creates a new service instance using the given authentication provider and client configuration. Additionally, * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. *

* This is an advanced constructor for clients that want to take control over how requests are signed. * @param authenticationDetailsProvider The authentication details provider, required. * @param configuration The client configuration, optional. * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. * @param signingStrategyRequestSignerFactories The request signer factories for each signing strategy used to create the request signer * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) */ public BlockchainPlatformAsyncClient( com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, com.oracle.bmc.ClientConfiguration configuration, com.oracle.bmc.http.ClientConfigurator clientConfigurator, com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, java.util.Map< com.oracle.bmc.http.signing.SigningStrategy, com.oracle.bmc.http.signing.RequestSignerFactory> signingStrategyRequestSignerFactories, java.util.List additionalClientConfigurators, String endpoint) { this( authenticationDetailsProvider, configuration, clientConfigurator, defaultRequestSignerFactory, signingStrategyRequestSignerFactories, additionalClientConfigurators, endpoint, com.oracle.bmc.http.internal.RestClientFactoryBuilder.builder()); } /** * Creates a new service instance using the given authentication provider and client configuration. Additionally, * a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization. *

* This is an advanced constructor for clients that want to take control over how requests are signed. * @param authenticationDetailsProvider The authentication details provider, required. * @param configuration The client configuration, optional. * @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional. * @param defaultRequestSignerFactory The request signer factory used to create the request signer for this service. * @param signingStrategyRequestSignerFactories The request signer factories for each signing strategy used to create the request signer * @param additionalClientConfigurators Additional client configurators to be run after the primary configurator. * @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider}) * @param restClientFactoryBuilder the builder for the {@link com.oracle.bmc.http.internal.RestClientFactory} */ public BlockchainPlatformAsyncClient( com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, com.oracle.bmc.ClientConfiguration configuration, com.oracle.bmc.http.ClientConfigurator clientConfigurator, com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, java.util.Map< com.oracle.bmc.http.signing.SigningStrategy, com.oracle.bmc.http.signing.RequestSignerFactory> signingStrategyRequestSignerFactories, java.util.List additionalClientConfigurators, String endpoint, com.oracle.bmc.http.internal.RestClientFactoryBuilder restClientFactoryBuilder) { this.authenticationDetailsProvider = authenticationDetailsProvider; java.util.List authenticationDetailsConfigurators = new java.util.ArrayList<>(); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.ProvidesClientConfigurators) { authenticationDetailsConfigurators.addAll( ((com.oracle.bmc.auth.ProvidesClientConfigurators) this.authenticationDetailsProvider) .getClientConfigurators()); } java.util.List allConfigurators = new java.util.ArrayList<>(additionalClientConfigurators); allConfigurators.addAll(authenticationDetailsConfigurators); com.oracle.bmc.http.internal.RestClientFactory restClientFactory = restClientFactoryBuilder .clientConfigurator(clientConfigurator) .additionalClientConfigurators(allConfigurators) .build(); boolean isNonBufferingApacheClient = com.oracle.bmc.http.ApacheUtils.isNonBufferingClientConfigurator( restClientFactory.getClientConfigurator()); this.apacheConnectionClosingStrategy = com.oracle.bmc.http.ApacheUtils.getApacheConnectionClosingStrategy( restClientFactory.getClientConfigurator()); com.oracle.bmc.http.signing.RequestSigner defaultRequestSigner = defaultRequestSignerFactory.createRequestSigner( SERVICE, this.authenticationDetailsProvider); java.util.Map< com.oracle.bmc.http.signing.SigningStrategy, com.oracle.bmc.http.signing.RequestSigner> requestSigners = new java.util.HashMap<>(); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.BasicAuthenticationDetailsProvider) { for (com.oracle.bmc.http.signing.SigningStrategy s : com.oracle.bmc.http.signing.SigningStrategy.values()) { requestSigners.put( s, signingStrategyRequestSignerFactories .get(s) .createRequestSigner(SERVICE, authenticationDetailsProvider)); } } this.client = restClientFactory.create( defaultRequestSigner, requestSigners, configuration, isNonBufferingApacheClient); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RegionProvider) { com.oracle.bmc.auth.RegionProvider provider = (com.oracle.bmc.auth.RegionProvider) this.authenticationDetailsProvider; if (provider.getRegion() != null) { this.setRegion(provider.getRegion()); if (endpoint != null) { LOG.info( "Authentication details provider configured for region '{}', but endpoint specifically set to '{}'. Using endpoint setting instead of region.", provider.getRegion(), endpoint); } } } if (endpoint != null) { setEndpoint(endpoint); } } /** * Create a builder for this client. * @return builder */ public static Builder builder() { return new Builder(SERVICE); } /** * Builder class for this client. The "authenticationDetailsProvider" is required and must be passed to the * {@link #build(AbstractAuthenticationDetailsProvider)} method. */ public static class Builder extends com.oracle.bmc.common.RegionalClientBuilder< Builder, BlockchainPlatformAsyncClient> { private Builder(com.oracle.bmc.Service service) { super(service); requestSignerFactory = new com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory( com.oracle.bmc.http.signing.SigningStrategy.STANDARD); } /** * Build the client. * @param authenticationDetailsProvider authentication details provider * @return the client */ public BlockchainPlatformAsyncClient build( @lombok.NonNull com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider) { return new BlockchainPlatformAsyncClient( authenticationDetailsProvider, configuration, clientConfigurator, requestSignerFactory, signingStrategyRequestSignerFactories, additionalClientConfigurators, endpoint); } } @Override public void setEndpoint(String endpoint) { LOG.info("Setting endpoint to {}", endpoint); client.setEndpoint(endpoint); } @Override public String getEndpoint() { String endpoint = null; java.net.URI uri = client.getBaseTarget().getUri(); if (uri != null) { endpoint = uri.toString(); } return endpoint; } @Override public void setRegion(com.oracle.bmc.Region region) { com.google.common.base.Optional endpoint = region.getEndpoint(SERVICE); if (endpoint.isPresent()) { setEndpoint(endpoint.get()); } else { throw new IllegalArgumentException( "Endpoint for " + SERVICE + " is not known in region " + region); } } @Override public void setRegion(String regionId) { regionId = regionId.toLowerCase(java.util.Locale.ENGLISH); try { com.oracle.bmc.Region region = com.oracle.bmc.Region.fromRegionId(regionId); setRegion(region); } catch (IllegalArgumentException e) { LOG.info("Unknown regionId '{}', falling back to default endpoint format", regionId); String endpoint = com.oracle.bmc.Region.formatDefaultRegionEndpoint(SERVICE, regionId); setEndpoint(endpoint); } } @Override public void close() { client.close(); } @Override public java.util.concurrent.Future changeBlockchainPlatformCompartment( ChangeBlockchainPlatformCompartmentRequest request, final com.oracle.bmc.responses.AsyncHandler< ChangeBlockchainPlatformCompartmentRequest, ChangeBlockchainPlatformCompartmentResponse> handler) { LOG.trace("Called async changeBlockchainPlatformCompartment"); final ChangeBlockchainPlatformCompartmentRequest interceptedRequest = ChangeBlockchainPlatformCompartmentConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = ChangeBlockchainPlatformCompartmentConverter.fromRequest( client, interceptedRequest); final com.google.common.base.Function< javax.ws.rs.core.Response, ChangeBlockchainPlatformCompartmentResponse> transformer = ChangeBlockchainPlatformCompartmentConverter.fromResponse(); com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); com.oracle.bmc.responses.AsyncHandler< ChangeBlockchainPlatformCompartmentRequest, ChangeBlockchainPlatformCompartmentResponse> handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler< ChangeBlockchainPlatformCompartmentRequest, ChangeBlockchainPlatformCompartmentResponse>, java.util.concurrent.Future> futureSupplier = client.postFutureSupplier( interceptedRequest, interceptedRequest.getChangeBlockchainPlatformCompartmentDetails(), ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< ChangeBlockchainPlatformCompartmentRequest, ChangeBlockchainPlatformCompartmentResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, futureSupplier) { @Override protected void beforeRetryAction() {} }; } else { return futureSupplier.apply(handlerToUse); } } @Override public java.util.concurrent.Future createBlockchainPlatform( CreateBlockchainPlatformRequest request, final com.oracle.bmc.responses.AsyncHandler< CreateBlockchainPlatformRequest, CreateBlockchainPlatformResponse> handler) { LOG.trace("Called async createBlockchainPlatform"); final CreateBlockchainPlatformRequest interceptedRequest = CreateBlockchainPlatformConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = CreateBlockchainPlatformConverter.fromRequest(client, interceptedRequest); final com.google.common.base.Function< javax.ws.rs.core.Response, CreateBlockchainPlatformResponse> transformer = CreateBlockchainPlatformConverter.fromResponse(); com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); com.oracle.bmc.responses.AsyncHandler< CreateBlockchainPlatformRequest, CreateBlockchainPlatformResponse> handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler< CreateBlockchainPlatformRequest, CreateBlockchainPlatformResponse>, java.util.concurrent.Future> futureSupplier = client.postFutureSupplier( interceptedRequest, interceptedRequest.getCreateBlockchainPlatformDetails(), ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< CreateBlockchainPlatformRequest, CreateBlockchainPlatformResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, futureSupplier) { @Override protected void beforeRetryAction() {} }; } else { return futureSupplier.apply(handlerToUse); } } @Override public java.util.concurrent.Future createOsn( CreateOsnRequest request, final com.oracle.bmc.responses.AsyncHandler handler) { LOG.trace("Called async createOsn"); final CreateOsnRequest interceptedRequest = CreateOsnConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = CreateOsnConverter.fromRequest(client, interceptedRequest); final com.google.common.base.Function transformer = CreateOsnConverter.fromResponse(); com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); com.oracle.bmc.responses.AsyncHandler handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler, java.util.concurrent.Future> futureSupplier = client.postFutureSupplier( interceptedRequest, interceptedRequest.getCreateOsnDetails(), ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< CreateOsnRequest, CreateOsnResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, futureSupplier) { @Override protected void beforeRetryAction() {} }; } else { return futureSupplier.apply(handlerToUse); } } @Override public java.util.concurrent.Future createPeer( CreatePeerRequest request, final com.oracle.bmc.responses.AsyncHandler handler) { LOG.trace("Called async createPeer"); final CreatePeerRequest interceptedRequest = CreatePeerConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = CreatePeerConverter.fromRequest(client, interceptedRequest); final com.google.common.base.Function transformer = CreatePeerConverter.fromResponse(); com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); com.oracle.bmc.responses.AsyncHandler handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler< CreatePeerRequest, CreatePeerResponse>, java.util.concurrent.Future> futureSupplier = client.postFutureSupplier( interceptedRequest, interceptedRequest.getCreatePeerDetails(), ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< CreatePeerRequest, CreatePeerResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, futureSupplier) { @Override protected void beforeRetryAction() {} }; } else { return futureSupplier.apply(handlerToUse); } } @Override public java.util.concurrent.Future deleteBlockchainPlatform( DeleteBlockchainPlatformRequest request, final com.oracle.bmc.responses.AsyncHandler< DeleteBlockchainPlatformRequest, DeleteBlockchainPlatformResponse> handler) { LOG.trace("Called async deleteBlockchainPlatform"); final DeleteBlockchainPlatformRequest interceptedRequest = DeleteBlockchainPlatformConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = DeleteBlockchainPlatformConverter.fromRequest(client, interceptedRequest); final com.google.common.base.Function< javax.ws.rs.core.Response, DeleteBlockchainPlatformResponse> transformer = DeleteBlockchainPlatformConverter.fromResponse(); com.oracle.bmc.responses.AsyncHandler< DeleteBlockchainPlatformRequest, DeleteBlockchainPlatformResponse> handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler< DeleteBlockchainPlatformRequest, DeleteBlockchainPlatformResponse>, java.util.concurrent.Future> futureSupplier = client.deleteFutureSupplier(interceptedRequest, ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< DeleteBlockchainPlatformRequest, DeleteBlockchainPlatformResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, futureSupplier) { @Override protected void beforeRetryAction() {} }; } else { return futureSupplier.apply(handlerToUse); } } @Override public java.util.concurrent.Future deleteOsn( DeleteOsnRequest request, final com.oracle.bmc.responses.AsyncHandler handler) { LOG.trace("Called async deleteOsn"); final DeleteOsnRequest interceptedRequest = DeleteOsnConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = DeleteOsnConverter.fromRequest(client, interceptedRequest); final com.google.common.base.Function transformer = DeleteOsnConverter.fromResponse(); com.oracle.bmc.responses.AsyncHandler handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler, java.util.concurrent.Future> futureSupplier = client.deleteFutureSupplier(interceptedRequest, ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< DeleteOsnRequest, DeleteOsnResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, futureSupplier) { @Override protected void beforeRetryAction() {} }; } else { return futureSupplier.apply(handlerToUse); } } @Override public java.util.concurrent.Future deletePeer( DeletePeerRequest request, final com.oracle.bmc.responses.AsyncHandler handler) { LOG.trace("Called async deletePeer"); final DeletePeerRequest interceptedRequest = DeletePeerConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = DeletePeerConverter.fromRequest(client, interceptedRequest); final com.google.common.base.Function transformer = DeletePeerConverter.fromResponse(); com.oracle.bmc.responses.AsyncHandler handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler< DeletePeerRequest, DeletePeerResponse>, java.util.concurrent.Future> futureSupplier = client.deleteFutureSupplier(interceptedRequest, ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< DeletePeerRequest, DeletePeerResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, futureSupplier) { @Override protected void beforeRetryAction() {} }; } else { return futureSupplier.apply(handlerToUse); } } @Override public java.util.concurrent.Future deleteWorkRequest( DeleteWorkRequestRequest request, final com.oracle.bmc.responses.AsyncHandler< DeleteWorkRequestRequest, DeleteWorkRequestResponse> handler) { LOG.trace("Called async deleteWorkRequest"); final DeleteWorkRequestRequest interceptedRequest = DeleteWorkRequestConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = DeleteWorkRequestConverter.fromRequest(client, interceptedRequest); final com.google.common.base.Function transformer = DeleteWorkRequestConverter.fromResponse(); com.oracle.bmc.responses.AsyncHandler handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler< DeleteWorkRequestRequest, DeleteWorkRequestResponse>, java.util.concurrent.Future> futureSupplier = client.deleteFutureSupplier(interceptedRequest, ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< DeleteWorkRequestRequest, DeleteWorkRequestResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, futureSupplier) { @Override protected void beforeRetryAction() {} }; } else { return futureSupplier.apply(handlerToUse); } } @Override public java.util.concurrent.Future getBlockchainPlatform( GetBlockchainPlatformRequest request, final com.oracle.bmc.responses.AsyncHandler< GetBlockchainPlatformRequest, GetBlockchainPlatformResponse> handler) { LOG.trace("Called async getBlockchainPlatform"); final GetBlockchainPlatformRequest interceptedRequest = GetBlockchainPlatformConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = GetBlockchainPlatformConverter.fromRequest(client, interceptedRequest); final com.google.common.base.Function< javax.ws.rs.core.Response, GetBlockchainPlatformResponse> transformer = GetBlockchainPlatformConverter.fromResponse(); com.oracle.bmc.responses.AsyncHandler< GetBlockchainPlatformRequest, GetBlockchainPlatformResponse> handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler< GetBlockchainPlatformRequest, GetBlockchainPlatformResponse>, java.util.concurrent.Future> futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< GetBlockchainPlatformRequest, GetBlockchainPlatformResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, futureSupplier) { @Override protected void beforeRetryAction() {} }; } else { return futureSupplier.apply(handlerToUse); } } @Override public java.util.concurrent.Future getOsn( GetOsnRequest request, final com.oracle.bmc.responses.AsyncHandler handler) { LOG.trace("Called async getOsn"); final GetOsnRequest interceptedRequest = GetOsnConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = GetOsnConverter.fromRequest(client, interceptedRequest); final com.google.common.base.Function transformer = GetOsnConverter.fromResponse(); com.oracle.bmc.responses.AsyncHandler handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler, java.util.concurrent.Future> futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< GetOsnRequest, GetOsnResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, futureSupplier) { @Override protected void beforeRetryAction() {} }; } else { return futureSupplier.apply(handlerToUse); } } @Override public java.util.concurrent.Future getPeer( GetPeerRequest request, final com.oracle.bmc.responses.AsyncHandler handler) { LOG.trace("Called async getPeer"); final GetPeerRequest interceptedRequest = GetPeerConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = GetPeerConverter.fromRequest(client, interceptedRequest); final com.google.common.base.Function transformer = GetPeerConverter.fromResponse(); com.oracle.bmc.responses.AsyncHandler handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler, java.util.concurrent.Future> futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< GetPeerRequest, GetPeerResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, futureSupplier) { @Override protected void beforeRetryAction() {} }; } else { return futureSupplier.apply(handlerToUse); } } @Override public java.util.concurrent.Future getWorkRequest( GetWorkRequestRequest request, final com.oracle.bmc.responses.AsyncHandler< GetWorkRequestRequest, GetWorkRequestResponse> handler) { LOG.trace("Called async getWorkRequest"); final GetWorkRequestRequest interceptedRequest = GetWorkRequestConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = GetWorkRequestConverter.fromRequest(client, interceptedRequest); final com.google.common.base.Function transformer = GetWorkRequestConverter.fromResponse(); com.oracle.bmc.responses.AsyncHandler handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler< GetWorkRequestRequest, GetWorkRequestResponse>, java.util.concurrent.Future> futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< GetWorkRequestRequest, GetWorkRequestResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, futureSupplier) { @Override protected void beforeRetryAction() {} }; } else { return futureSupplier.apply(handlerToUse); } } @Override public java.util.concurrent.Future listBlockchainPlatforms( ListBlockchainPlatformsRequest request, final com.oracle.bmc.responses.AsyncHandler< ListBlockchainPlatformsRequest, ListBlockchainPlatformsResponse> handler) { LOG.trace("Called async listBlockchainPlatforms"); final ListBlockchainPlatformsRequest interceptedRequest = ListBlockchainPlatformsConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = ListBlockchainPlatformsConverter.fromRequest(client, interceptedRequest); final com.google.common.base.Function< javax.ws.rs.core.Response, ListBlockchainPlatformsResponse> transformer = ListBlockchainPlatformsConverter.fromResponse(); com.oracle.bmc.responses.AsyncHandler< ListBlockchainPlatformsRequest, ListBlockchainPlatformsResponse> handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler< ListBlockchainPlatformsRequest, ListBlockchainPlatformsResponse>, java.util.concurrent.Future> futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< ListBlockchainPlatformsRequest, ListBlockchainPlatformsResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, futureSupplier) { @Override protected void beforeRetryAction() {} }; } else { return futureSupplier.apply(handlerToUse); } } @Override public java.util.concurrent.Future listOsns( ListOsnsRequest request, final com.oracle.bmc.responses.AsyncHandler handler) { LOG.trace("Called async listOsns"); final ListOsnsRequest interceptedRequest = ListOsnsConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = ListOsnsConverter.fromRequest(client, interceptedRequest); final com.google.common.base.Function transformer = ListOsnsConverter.fromResponse(); com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); com.oracle.bmc.responses.AsyncHandler handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler, java.util.concurrent.Future> futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< ListOsnsRequest, ListOsnsResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, futureSupplier) { @Override protected void beforeRetryAction() {} }; } else { return futureSupplier.apply(handlerToUse); } } @Override public java.util.concurrent.Future listPeers( ListPeersRequest request, final com.oracle.bmc.responses.AsyncHandler handler) { LOG.trace("Called async listPeers"); final ListPeersRequest interceptedRequest = ListPeersConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = ListPeersConverter.fromRequest(client, interceptedRequest); final com.google.common.base.Function transformer = ListPeersConverter.fromResponse(); com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); com.oracle.bmc.responses.AsyncHandler handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler, java.util.concurrent.Future> futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< ListPeersRequest, ListPeersResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, futureSupplier) { @Override protected void beforeRetryAction() {} }; } else { return futureSupplier.apply(handlerToUse); } } @Override public java.util.concurrent.Future listWorkRequestErrors( ListWorkRequestErrorsRequest request, final com.oracle.bmc.responses.AsyncHandler< ListWorkRequestErrorsRequest, ListWorkRequestErrorsResponse> handler) { LOG.trace("Called async listWorkRequestErrors"); final ListWorkRequestErrorsRequest interceptedRequest = ListWorkRequestErrorsConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = ListWorkRequestErrorsConverter.fromRequest(client, interceptedRequest); final com.google.common.base.Function< javax.ws.rs.core.Response, ListWorkRequestErrorsResponse> transformer = ListWorkRequestErrorsConverter.fromResponse(); com.oracle.bmc.responses.AsyncHandler< ListWorkRequestErrorsRequest, ListWorkRequestErrorsResponse> handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler< ListWorkRequestErrorsRequest, ListWorkRequestErrorsResponse>, java.util.concurrent.Future> futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< ListWorkRequestErrorsRequest, ListWorkRequestErrorsResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, futureSupplier) { @Override protected void beforeRetryAction() {} }; } else { return futureSupplier.apply(handlerToUse); } } @Override public java.util.concurrent.Future listWorkRequestLogs( ListWorkRequestLogsRequest request, final com.oracle.bmc.responses.AsyncHandler< ListWorkRequestLogsRequest, ListWorkRequestLogsResponse> handler) { LOG.trace("Called async listWorkRequestLogs"); final ListWorkRequestLogsRequest interceptedRequest = ListWorkRequestLogsConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = ListWorkRequestLogsConverter.fromRequest(client, interceptedRequest); final com.google.common.base.Function< javax.ws.rs.core.Response, ListWorkRequestLogsResponse> transformer = ListWorkRequestLogsConverter.fromResponse(); com.oracle.bmc.responses.AsyncHandler< ListWorkRequestLogsRequest, ListWorkRequestLogsResponse> handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler< ListWorkRequestLogsRequest, ListWorkRequestLogsResponse>, java.util.concurrent.Future> futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< ListWorkRequestLogsRequest, ListWorkRequestLogsResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, futureSupplier) { @Override protected void beforeRetryAction() {} }; } else { return futureSupplier.apply(handlerToUse); } } @Override public java.util.concurrent.Future listWorkRequests( ListWorkRequestsRequest request, final com.oracle.bmc.responses.AsyncHandler< ListWorkRequestsRequest, ListWorkRequestsResponse> handler) { LOG.trace("Called async listWorkRequests"); final ListWorkRequestsRequest interceptedRequest = ListWorkRequestsConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = ListWorkRequestsConverter.fromRequest(client, interceptedRequest); final com.google.common.base.Function transformer = ListWorkRequestsConverter.fromResponse(); com.oracle.bmc.responses.AsyncHandler handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler< ListWorkRequestsRequest, ListWorkRequestsResponse>, java.util.concurrent.Future> futureSupplier = client.getFutureSupplier(interceptedRequest, ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< ListWorkRequestsRequest, ListWorkRequestsResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, futureSupplier) { @Override protected void beforeRetryAction() {} }; } else { return futureSupplier.apply(handlerToUse); } } @Override public java.util.concurrent.Future previewScaleBlockchainPlatform( PreviewScaleBlockchainPlatformRequest request, final com.oracle.bmc.responses.AsyncHandler< PreviewScaleBlockchainPlatformRequest, PreviewScaleBlockchainPlatformResponse> handler) { LOG.trace("Called async previewScaleBlockchainPlatform"); final PreviewScaleBlockchainPlatformRequest interceptedRequest = PreviewScaleBlockchainPlatformConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = PreviewScaleBlockchainPlatformConverter.fromRequest(client, interceptedRequest); final com.google.common.base.Function< javax.ws.rs.core.Response, PreviewScaleBlockchainPlatformResponse> transformer = PreviewScaleBlockchainPlatformConverter.fromResponse(); com.oracle.bmc.responses.AsyncHandler< PreviewScaleBlockchainPlatformRequest, PreviewScaleBlockchainPlatformResponse> handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler< PreviewScaleBlockchainPlatformRequest, PreviewScaleBlockchainPlatformResponse>, java.util.concurrent.Future> futureSupplier = client.postFutureSupplier( interceptedRequest, interceptedRequest.getScaleBlockchainPlatformDetails(), ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< PreviewScaleBlockchainPlatformRequest, PreviewScaleBlockchainPlatformResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, futureSupplier) { @Override protected void beforeRetryAction() {} }; } else { return futureSupplier.apply(handlerToUse); } } @Override public java.util.concurrent.Future scaleBlockchainPlatform( ScaleBlockchainPlatformRequest request, final com.oracle.bmc.responses.AsyncHandler< ScaleBlockchainPlatformRequest, ScaleBlockchainPlatformResponse> handler) { LOG.trace("Called async scaleBlockchainPlatform"); final ScaleBlockchainPlatformRequest interceptedRequest = ScaleBlockchainPlatformConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = ScaleBlockchainPlatformConverter.fromRequest(client, interceptedRequest); final com.google.common.base.Function< javax.ws.rs.core.Response, ScaleBlockchainPlatformResponse> transformer = ScaleBlockchainPlatformConverter.fromResponse(); com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); com.oracle.bmc.responses.AsyncHandler< ScaleBlockchainPlatformRequest, ScaleBlockchainPlatformResponse> handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler< ScaleBlockchainPlatformRequest, ScaleBlockchainPlatformResponse>, java.util.concurrent.Future> futureSupplier = client.postFutureSupplier( interceptedRequest, interceptedRequest.getScaleBlockchainPlatformDetails(), ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< ScaleBlockchainPlatformRequest, ScaleBlockchainPlatformResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, futureSupplier) { @Override protected void beforeRetryAction() {} }; } else { return futureSupplier.apply(handlerToUse); } } @Override public java.util.concurrent.Future startBlockchainPlatform( StartBlockchainPlatformRequest request, final com.oracle.bmc.responses.AsyncHandler< StartBlockchainPlatformRequest, StartBlockchainPlatformResponse> handler) { LOG.trace("Called async startBlockchainPlatform"); final StartBlockchainPlatformRequest interceptedRequest = StartBlockchainPlatformConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = StartBlockchainPlatformConverter.fromRequest(client, interceptedRequest); final com.google.common.base.Function< javax.ws.rs.core.Response, StartBlockchainPlatformResponse> transformer = StartBlockchainPlatformConverter.fromResponse(); com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); com.oracle.bmc.responses.AsyncHandler< StartBlockchainPlatformRequest, StartBlockchainPlatformResponse> handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler< StartBlockchainPlatformRequest, StartBlockchainPlatformResponse>, java.util.concurrent.Future> futureSupplier = client.postFutureSupplier(interceptedRequest, ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< StartBlockchainPlatformRequest, StartBlockchainPlatformResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, futureSupplier) { @Override protected void beforeRetryAction() {} }; } else { return futureSupplier.apply(handlerToUse); } } @Override public java.util.concurrent.Future stopBlockchainPlatform( StopBlockchainPlatformRequest request, final com.oracle.bmc.responses.AsyncHandler< StopBlockchainPlatformRequest, StopBlockchainPlatformResponse> handler) { LOG.trace("Called async stopBlockchainPlatform"); final StopBlockchainPlatformRequest interceptedRequest = StopBlockchainPlatformConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = StopBlockchainPlatformConverter.fromRequest(client, interceptedRequest); final com.google.common.base.Function< javax.ws.rs.core.Response, StopBlockchainPlatformResponse> transformer = StopBlockchainPlatformConverter.fromResponse(); com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); com.oracle.bmc.responses.AsyncHandler< StopBlockchainPlatformRequest, StopBlockchainPlatformResponse> handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler< StopBlockchainPlatformRequest, StopBlockchainPlatformResponse>, java.util.concurrent.Future> futureSupplier = client.postFutureSupplier(interceptedRequest, ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< StopBlockchainPlatformRequest, StopBlockchainPlatformResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, futureSupplier) { @Override protected void beforeRetryAction() {} }; } else { return futureSupplier.apply(handlerToUse); } } @Override public java.util.concurrent.Future updateBlockchainPlatform( UpdateBlockchainPlatformRequest request, final com.oracle.bmc.responses.AsyncHandler< UpdateBlockchainPlatformRequest, UpdateBlockchainPlatformResponse> handler) { LOG.trace("Called async updateBlockchainPlatform"); final UpdateBlockchainPlatformRequest interceptedRequest = UpdateBlockchainPlatformConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = UpdateBlockchainPlatformConverter.fromRequest(client, interceptedRequest); final com.google.common.base.Function< javax.ws.rs.core.Response, UpdateBlockchainPlatformResponse> transformer = UpdateBlockchainPlatformConverter.fromResponse(); com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); com.oracle.bmc.responses.AsyncHandler< UpdateBlockchainPlatformRequest, UpdateBlockchainPlatformResponse> handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler< UpdateBlockchainPlatformRequest, UpdateBlockchainPlatformResponse>, java.util.concurrent.Future> futureSupplier = client.putFutureSupplier( interceptedRequest, interceptedRequest.getUpdateBlockchainPlatformDetails(), ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< UpdateBlockchainPlatformRequest, UpdateBlockchainPlatformResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, futureSupplier) { @Override protected void beforeRetryAction() {} }; } else { return futureSupplier.apply(handlerToUse); } } @Override public java.util.concurrent.Future updateOsn( UpdateOsnRequest request, final com.oracle.bmc.responses.AsyncHandler handler) { LOG.trace("Called async updateOsn"); final UpdateOsnRequest interceptedRequest = UpdateOsnConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = UpdateOsnConverter.fromRequest(client, interceptedRequest); final com.google.common.base.Function transformer = UpdateOsnConverter.fromResponse(); com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); com.oracle.bmc.responses.AsyncHandler handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler, java.util.concurrent.Future> futureSupplier = client.putFutureSupplier( interceptedRequest, interceptedRequest.getUpdateOsnDetails(), ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< UpdateOsnRequest, UpdateOsnResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, futureSupplier) { @Override protected void beforeRetryAction() {} }; } else { return futureSupplier.apply(handlerToUse); } } @Override public java.util.concurrent.Future updatePeer( UpdatePeerRequest request, final com.oracle.bmc.responses.AsyncHandler handler) { LOG.trace("Called async updatePeer"); final UpdatePeerRequest interceptedRequest = UpdatePeerConverter.interceptRequest(request); final com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = UpdatePeerConverter.fromRequest(client, interceptedRequest); final com.google.common.base.Function transformer = UpdatePeerConverter.fromResponse(); com.oracle.bmc.http.internal.RetryTokenUtils.addRetryToken(ib); com.oracle.bmc.responses.AsyncHandler handlerToUse = handler; java.util.function.Function< com.oracle.bmc.responses.AsyncHandler< UpdatePeerRequest, UpdatePeerResponse>, java.util.concurrent.Future> futureSupplier = client.putFutureSupplier( interceptedRequest, interceptedRequest.getUpdatePeerDetails(), ib, transformer); if (this.authenticationDetailsProvider instanceof com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) { return new com.oracle.bmc.util.internal.RefreshAuthTokenWrapper< UpdatePeerRequest, UpdatePeerResponse>( (com.oracle.bmc.auth.RefreshableOnNotAuthenticatedProvider) this.authenticationDetailsProvider, handlerToUse, futureSupplier) { @Override protected void beforeRetryAction() {} }; } else { return futureSupplier.apply(handlerToUse); } } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy