All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.quarkus.amazon.sns.runtime.SnsRecorder Maven / Gradle / Ivy

There is a newer version: 3.2.0
Show newest version
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