use of software.amazon.awssdk.core.interceptor.ClasspathInterceptorChainFactory in project aws-sdk-java-v2 by aws.
the class DefaultJsonBaseClientBuilder method finalizeServiceConfiguration.
@Override
protected final SdkClientConfiguration finalizeServiceConfiguration(SdkClientConfiguration config) {
ClasspathInterceptorChainFactory interceptorFactory = new ClasspathInterceptorChainFactory();
List<ExecutionInterceptor> interceptors = interceptorFactory.getInterceptors("software/amazon/awssdk/services/json/execution.interceptors");
interceptors = CollectionUtils.mergeLists(interceptors, config.option(SdkClientOption.EXECUTION_INTERCEPTORS));
return config.toBuilder().option(SdkClientOption.EXECUTION_INTERCEPTORS, interceptors).build();
}
use of software.amazon.awssdk.core.interceptor.ClasspathInterceptorChainFactory in project aws-sdk-java-v2 by aws.
the class DefaultS3Presigner method initializeInterceptors.
/**
* Copied from {@code DefaultS3BaseClientBuilder} and {@link SdkDefaultClientBuilder}.
*/
private List<ExecutionInterceptor> initializeInterceptors() {
ClasspathInterceptorChainFactory interceptorFactory = new ClasspathInterceptorChainFactory();
List<ExecutionInterceptor> s3Interceptors = interceptorFactory.getInterceptors("software/amazon/awssdk/services/s3/execution.interceptors");
return mergeLists(interceptorFactory.getGlobalInterceptors(), s3Interceptors);
}
use of software.amazon.awssdk.core.interceptor.ClasspathInterceptorChainFactory in project aws-sdk-java-v2 by aws.
the class DefaultQueryBaseClientBuilder method finalizeServiceConfiguration.
@Override
protected final SdkClientConfiguration finalizeServiceConfiguration(SdkClientConfiguration config) {
ClasspathInterceptorChainFactory interceptorFactory = new ClasspathInterceptorChainFactory();
List<ExecutionInterceptor> interceptors = interceptorFactory.getInterceptors("software/amazon/awssdk/services/query/execution.interceptors");
interceptors = CollectionUtils.mergeLists(interceptors, config.option(SdkClientOption.EXECUTION_INTERCEPTORS));
List<ExecutionInterceptor> protocolInterceptors = Collections.singletonList(new QueryParametersToBodyInterceptor());
interceptors = CollectionUtils.mergeLists(interceptors, protocolInterceptors);
return config.toBuilder().option(SdkClientOption.EXECUTION_INTERCEPTORS, interceptors).build();
}
Aggregations