@SdkTestInternalApi ApacheHttpClient(ConnectionManagerAwareHttpClient httpClient, ApacheHttpRequestConfig requestConfig, AttributeMap resolvedOptions) { this.httpClient = httpClient; this.requestConfig = requestConfig; this.resolvedOptions = resolvedOptions; }
@SdkTestInternalApi Builder credentialsEndpointProvider(ResourcesEndpointProvider credentialsEndpointProvider) { this.credentialsEndpointProvider = credentialsEndpointProvider; return this; }
@SdkTestInternalApi NettyNioAsyncHttpClient(SdkEventLoopGroup sdkEventLoopGroup, SdkChannelPoolMap<URI, ChannelPool> pools, SdkChannelOptions sdkChannelOptions, NettyConfiguration configuration, long maxStreams) { this.sdkEventLoopGroup = sdkEventLoopGroup; this.pools = pools; this.sdkChannelOptions = sdkChannelOptions; this.configuration = configuration; this.maxStreams = maxStreams; }
@SdkTestInternalApi IdleConnectionReaper(Map<HttpClientConnectionManager, Long> connectionManagers, Supplier<ExecutorService> executorServiceSupplier, long sleepPeriod) { this.connectionManagers = connectionManagers; this.executorServiceSupplier = executorServiceSupplier; this.sleepPeriod = sleepPeriod; }
/** * Override the default configuration file to be used when the customer does not explicitly set * profileName(profileName); * {@link #profileFile(ProfileFile)}. Use of this method is only useful for testing the default behavior. */ @SdkTestInternalApi Builder defaultProfileFileLoader(Supplier<ProfileFile> defaultProfileFileLoader) { this.defaultProfileFileLoader = defaultProfileFileLoader; return this; } }
@SdkTestInternalApi Builder credentialsEndpointProvider(ResourcesEndpointProvider credentialsEndpointProvider) { this.credentialsEndpointProvider = credentialsEndpointProvider; return this; }
@SdkTestInternalApi NettyNioAsyncHttpClient(SdkEventLoopGroup sdkEventLoopGroup, SdkChannelPoolMap<URI, ChannelPool> pools, SdkChannelOptions sdkChannelOptions, NettyConfiguration configuration, long maxStreams) { this.sdkEventLoopGroup = sdkEventLoopGroup; this.pools = pools; this.sdkChannelOptions = sdkChannelOptions; this.configuration = configuration; this.maxStreams = maxStreams; }
@SdkTestInternalApi AwsDefaultClientBuilder(SdkHttpClient.Builder defaultHttpClientBuilder, SdkAsyncHttpClient.Builder defaultAsyncHttpClientFactory) { super(defaultHttpClientBuilder, defaultAsyncHttpClientFactory); }
@SdkTestInternalApi CopyDbSnapshotPresignInterceptor(Clock signingDateOverride) { super(CopyDbSnapshotRequest.class, signingDateOverride); }
@SdkTestInternalApi protected SdkDefaultClientBuilder(SdkHttpClient.Builder defaultHttpClientBuilder, SdkAsyncHttpClient.Builder defaultAsyncHttpClientBuilder) { this.defaultHttpClientBuilder = defaultHttpClientBuilder; this.defaultAsyncHttpClientBuilder = defaultAsyncHttpClientBuilder; }
@SdkTestInternalApi ClasspathSdkHttpServiceProvider(SdkServiceLoader serviceLoader, SystemSetting implSystemProperty, Class<T> serviceClass) { this.serviceLoader = serviceLoader; this.implSystemProperty = implSystemProperty; this.serviceClass = serviceClass; }
@SdkTestInternalApi public static void setGenerator(Supplier<String> newGenerator) { generator = newGenerator; } }
/** * Override the default configuration file to be used when the customer does not explicitly set * profileName(profileName); * {@link #profileFile(ProfileFile)}. Use of this method is only useful for testing the default behavior. */ @SdkTestInternalApi Builder defaultProfileFileLoader(Supplier<ProfileFile> defaultProfileFileLoader) { this.defaultProfileFileLoader = defaultProfileFileLoader; return this; } }
@SdkTestInternalApi static synchronized int referenceCount() { return referenceCount; }
@SdkTestInternalApi static synchronized int referenceCount() { return referenceCount; }
@SdkTestInternalApi CopyDbSnapshotPresignInterceptor(Clock signingDateOverride) { super(CopyDbSnapshotRequest.class, signingDateOverride); }
/** * Wrapper around {@link SdkAsyncHttpClient} to prevent it from being closed. Used when the customer provides * an already built client in which case they are responsible for the lifecycle of it. */ @SdkTestInternalApi public static final class NonManagedSdkAsyncHttpClient implements SdkAsyncHttpClient { private final SdkAsyncHttpClient delegate; NonManagedSdkAsyncHttpClient(SdkAsyncHttpClient delegate) { this.delegate = paramNotNull(delegate, "SdkAsyncHttpClient"); } @Override public CompletableFuture<Void> execute(AsyncExecuteRequest request) { return delegate.execute(request); } @Override public void close() { // Do nothing, this client is managed by the customer. } }
/** * Wrapper around {@link SdkHttpClient} to prevent it from being closed. Used when the customer provides * an already built client in which case they are responsible for the lifecycle of it. */ @SdkTestInternalApi public static final class NonManagedSdkHttpClient implements SdkHttpClient { private final SdkHttpClient delegate; private NonManagedSdkHttpClient(SdkHttpClient delegate) { this.delegate = paramNotNull(delegate, "SdkHttpClient"); } @Override public ExecutableHttpRequest prepareRequest(HttpExecuteRequest request) { return delegate.prepareRequest(request); } @Override public void close() { // Do nothing, this client is managed by the customer. } }
@SdkTestInternalApi Http2MultiplexedChannelPool(ChannelPool connectionPool, EventLoop eventLoop, long maxConcurrencyPerConnection, Collection<MultiplexedChannelRecord> connections) { this.connectionPool = connectionPool; this.eventLoop = eventLoop; this.maxConcurrencyPerConnection = maxConcurrencyPerConnection; this.connections = new ArrayList<>(connections); }
/** * Test API to reset pool count for reliable assertions. */ @SdkTestInternalApi static void resetPoolNumber() { POOL_NUMBER.set(0); }