software.amazon.awssdk.services.sns.SnsAsyncClientBuilder Java Examples

The following examples show how to use software.amazon.awssdk.services.sns.SnsAsyncClientBuilder. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: SnsClientFactory.java    From micronaut-aws with Apache License 2.0 5 votes vote down vote up
@Override
@Bean(preDestroy = "close")
@Singleton
@Requires(beans = SdkAsyncHttpClient.class)
public SnsAsyncClient asyncClient(SnsAsyncClientBuilder builder) {
    return super.asyncClient(builder);
}
 
Example #2
Source File: SnsRecorder.java    From quarkus with Apache License 2.0 5 votes vote down vote up
public RuntimeValue<AwsClientBuilder> createAsyncBuilder(SnsConfig config,
        RuntimeValue<SdkAsyncHttpClient.Builder> transport) {

    SnsAsyncClientBuilder builder = SnsAsyncClient.builder();

    if (transport != null) {
        builder.httpClientBuilder(transport.getValue());
    }
    return new RuntimeValue<>(builder);
}
 
Example #3
Source File: SnsRecorder.java    From quarkus with Apache License 2.0 5 votes vote down vote up
public RuntimeValue<SnsAsyncClient> buildAsyncClient(RuntimeValue<? extends AwsClientBuilder> builder,
        BeanContainer beanContainer,
        ShutdownContext shutdown) {
    SnsClientProducer producer = beanContainer.instance(SnsClientProducer.class);
    producer.setAsyncConfiguredBuilder((SnsAsyncClientBuilder) builder.getValue());
    shutdown.addShutdownTask(producer::destroy);
    return new RuntimeValue<>(producer.asyncClient());
}
 
Example #4
Source File: BasicSnsAsyncClientProvider.java    From beam with Apache License 2.0 5 votes vote down vote up
@Override
public SnsAsyncClient getSnsAsyncClient() {
  SnsAsyncClientBuilder builder =
      SnsAsyncClient.builder()
          .credentialsProvider(awsCredentialsProvider)
          .region(Region.of(region));

  if (serviceEndpoint != null) {
    builder.endpointOverride(serviceEndpoint);
  }

  return builder.build();
}
 
Example #5
Source File: SnsClientFactory.java    From micronaut-aws with Apache License 2.0 4 votes vote down vote up
@Override
protected SnsAsyncClientBuilder createAsyncBuilder() {
    return SnsAsyncClient.builder();
}
 
Example #6
Source File: SnsClientFactory.java    From micronaut-aws with Apache License 2.0 4 votes vote down vote up
@Override
@Singleton
@Requires(beans = SdkAsyncHttpClient.class)
public SnsAsyncClientBuilder asyncBuilder(SdkAsyncHttpClient httpClient) {
    return super.asyncBuilder(httpClient);
}
 
Example #7
Source File: SnsClientProducer.java    From quarkus with Apache License 2.0 4 votes vote down vote up
public void setAsyncConfiguredBuilder(SnsAsyncClientBuilder asyncConfiguredBuilder) {
    this.asyncConfiguredBuilder = asyncConfiguredBuilder;
}