io.quarkus.amazon.sns.runtime.SnsRecorder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of quarkus-amazon-sns Show documentation
Show all versions of quarkus-amazon-sns Show documentation
Connect to Amazon SNS pub/sub messaging service
package io.quarkus.amazon.sns.runtime;
import io.quarkus.amazon.common.runtime.AmazonClientRecorder;
import io.quarkus.amazon.common.runtime.AsyncHttpClientConfig;
import io.quarkus.amazon.common.runtime.AwsConfig;
import io.quarkus.amazon.common.runtime.SdkConfig;
import io.quarkus.amazon.common.runtime.SyncHttpClientConfig;
import io.quarkus.runtime.RuntimeValue;
import io.quarkus.runtime.annotations.Recorder;
import software.amazon.awssdk.awscore.client.builder.AwsAsyncClientBuilder;
import software.amazon.awssdk.awscore.client.builder.AwsSyncClientBuilder;
import software.amazon.awssdk.services.sns.SnsAsyncClient;
import software.amazon.awssdk.services.sns.SnsClient;
@Recorder
public class SnsRecorder extends AmazonClientRecorder {
final SnsConfig config;
public SnsRecorder(SnsConfig config) {
this.config = config;
}
@Override
public RuntimeValue getAwsConfig() {
return new RuntimeValue<>(config.aws());
}
@Override
public RuntimeValue getSdkConfig() {
return new RuntimeValue<>(config.sdk());
}
@Override
public AsyncHttpClientConfig getAsyncClientConfig() {
return config.asyncClient();
}
@Override
public SyncHttpClientConfig getSyncClientConfig() {
return config.syncClient();
}
@Override
public AwsSyncClientBuilder, ?> geSyncClientBuilder() {
return SnsClient.builder();
}
@Override
public AwsAsyncClientBuilder, ?> getAsyncClientBuilder() {
return SnsAsyncClient.builder();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy