protected abstract TypeToBuild build(AwsAsyncClientParams asyncClientParams);
/** * Sets a custom executor service factory to use for the async clients. The factory will be * called for each async client created through the builder. * * @param executorFactory Factory supplying new instances of {@link ExecutorService} * @return This object for method chaining. */ public final Subclass withExecutorFactory(ExecutorFactory executorFactory) { setExecutorFactory(executorFactory); return getSubclass(); }
/** * @returns The current setting for FIPS enabled endpoints configured in the builder. * @see <a href="https://www.nist.gov/itl/fips-general-information">FIPS General Information</a> */ public Boolean isFipsEnabled() { return super.getAdvancedConfig(S3ControlClientOptions.FIPS_ENABLED); }
/** * Sets the status of FIPS enabled endpoints for clients built with this builder. The default is to not use FIPS * endpoints. * * @param fipsEnabled * True if FIPS endpoints should be used, false if FIPS endpoints should not be used. * @see <a href="https://www.nist.gov/itl/fips-general-information">FIPS General Information</a> */ public void setFipsEnabled(Boolean fipsEnabled) { super.putAdvancedConfig(S3ControlClientOptions.FIPS_ENABLED, fipsEnabled); }
@SuppressWarnings("unchecked") @Override protected T createInstance() throws Exception { String builderName = this.clientClass.getName() + "Builder"; Class<?> className = ClassUtils.resolveClassName(builderName, ClassUtils.getDefaultClassLoader()); Method method = ClassUtils.getStaticMethod(className, "standard"); Assert.notNull(method, "Could not find standard() method in class:'" + className.getName() + "'"); AwsClientBuilder<?, T> builder = (AwsClientBuilder<?, T>) ReflectionUtils.invokeMethod(method, null); if (this.executor != null) { AwsAsyncClientBuilder<?, T> asyncBuilder = (AwsAsyncClientBuilder<?, T>) builder; asyncBuilder.withExecutorFactory((ExecutorFactory) () -> this.executor); } if (this.credentialsProvider != null) { builder.withCredentials(this.credentialsProvider); } if (this.customRegion != null) { builder.withRegion(this.customRegion.getName()); } else if (this.regionProvider != null) { builder.withRegion(this.regionProvider.getRegion().getName()); } else { builder.withRegion(Regions.DEFAULT_REGION); } return builder.build(); }
/** * Sets the status of Dual-Stack endpoints (supports both IPv4 and IPv6) for clients built with this builder. The * default is to not use Dual-Stack endpoints. * * @param dualstackEnabled * True if Dual-Stack endpoints should be used, false if Dual-Stack endpoints should not be used. * @see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/dual-stack-endpoints.html">Using Amazon S3 * Dual-Stack Endpoints</a> */ public void setDualstackEnabled(Boolean dualstackEnabled) { super.putAdvancedConfig(S3ControlClientOptions.DUALSTACK_ENABLED, dualstackEnabled); }
@SuppressWarnings("unchecked") @Override protected T createInstance() throws Exception { String builderName = this.clientClass.getName() + "Builder"; Class<?> className = ClassUtils.resolveClassName(builderName, ClassUtils.getDefaultClassLoader()); Method method = ClassUtils.getStaticMethod(className, "standard"); Assert.notNull(method, "Could not find standard() method in class:'" + className.getName() + "'"); AwsClientBuilder<?, T> builder = (AwsClientBuilder<?, T>) ReflectionUtils.invokeMethod(method, null); if (this.executor != null) { AwsAsyncClientBuilder<?, T> asyncBuilder = (AwsAsyncClientBuilder<?, T>) builder; asyncBuilder.withExecutorFactory((ExecutorFactory) () -> this.executor); } if (this.credentialsProvider != null) { builder.withCredentials(this.credentialsProvider); } if (this.customRegion != null) { builder.withRegion(this.customRegion.getName()); } else if (this.regionProvider != null) { builder.withRegion(this.regionProvider.getRegion().getName()); } else { builder.withRegion(Regions.DEFAULT_REGION); } return builder.build(); }
protected abstract TypeToBuild build(AwsAsyncClientParams asyncClientParams);
/** * Sets a custom executor service factory to use for the async clients. The factory will be * called for each async client created through the builder. * * @param executorFactory Factory supplying new instances of {@link ExecutorService} * @return This object for method chaining. */ public final Subclass withExecutorFactory(ExecutorFactory executorFactory) { setExecutorFactory(executorFactory); return getSubclass(); }
/** * @returns The current setting for Dual-Stack endpoints (supports both IPv4 and IPv6) configured in the builder. * @see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/dual-stack-endpoints.html">Using Amazon S3 * Dual-Stack Endpoints</a> */ public Boolean isDualstackEnabled() { return super.getAdvancedConfig(S3ControlClientOptions.DUALSTACK_ENABLED); }
protected abstract TypeToBuild build(AwsAsyncClientParams asyncClientParams);
/** * Sets a custom executor service factory to use for the async clients. The factory will be * called for each async client created through the builder. * * @param executorFactory Factory supplying new instances of {@link ExecutorService} * @return This object for method chaining. */ public final Subclass withExecutorFactory(ExecutorFactory executorFactory) { setExecutorFactory(executorFactory); return getSubclass(); }