@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; } }
@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); }
/** * Test API to reset pool count for reliable assertions. */ @SdkTestInternalApi static void resetPoolNumber() { POOL_NUMBER.set(0); }
@SdkTestInternalApi MultiplexedChannelRecord(Future<Channel> connectionFuture, Channel connection, long maxConcurrencyPerConnection, BiConsumer<Channel, MultiplexedChannelRecord> channelReleaser) { this.connectionFuture = connectionFuture; this.childChannels = new ConcurrentHashMap<>(saturatedCast(maxConcurrencyPerConnection)); this.availableStreams = new AtomicLong(maxConcurrencyPerConnection); this.channelReleaser = channelReleaser; this.connection = connection; }
@SdkTestInternalApi protected final String getContentType() { return getContentTypeResolver().resolveContentType(protocolMetadata); }
@SdkTestInternalApi private StructuredJsonGenerator createGenerator() { return getSdkFactory().createWriter(getContentType()); }
/** * This method is only used in test, where clockOverride is passed in signingParams */ @SdkTestInternalApi protected final AsyncRequestBody signAsync(SdkHttpFullRequest request, AsyncRequestBody asyncRequestBody, Aws4SignerRequestParams requestParams, Aws4SignerParams signingParams) { AwsCredentials sanitizedCredentials = sanitizeCredentials(signingParams.awsCredentials()); byte[] signingKey = deriveSigningKey(sanitizedCredentials, requestParams); String headerSignature = getHeaderSignature(request); return transformRequestProvider(headerSignature, signingKey, requestParams, signingParams, asyncRequestBody); }
/** * This method is only used in test, where clockOverride is passed in signingParams */ @SdkTestInternalApi protected final AsyncRequestBody signAsync(SdkHttpFullRequest request, AsyncRequestBody asyncRequestBody, Aws4SignerRequestParams requestParams, Aws4SignerParams signingParams) { AwsCredentials sanitizedCredentials = sanitizeCredentials(signingParams.awsCredentials()); byte[] signingKey = deriveSigningKey(sanitizedCredentials, requestParams); String headerSignature = getHeaderSignature(request); return transformRequestProvider(headerSignature, signingKey, requestParams, signingParams, asyncRequestBody); }