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

io.sphere.sdk.subscriptions.SqsDestination Maven / Gradle / Ivy

There is a newer version: 2.16.0
Show newest version
package io.sphere.sdk.subscriptions;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import io.sphere.sdk.annotations.ResourceValue;

import java.net.URI;

import static java.util.Objects.requireNonNull;

/**
 * Amazon Simple Queue Service (SQS) is a pull-queue on AWS and can be used as a subscription destination.
 */
@JsonDeserialize(as = SqsDestinationImpl.class)
@ResourceValue
public interface SqsDestination extends Destination {

    URI getQueueUrl();

    String getAccessKey();

    String getAccessSecret();

    String getRegion();

    static SqsDestination of(final AwsCredentials awsCredentials, final String region, final URI queueURL) {
        return new SqsDestinationImpl(awsCredentials.getAccessKey(), awsCredentials.getAccessSecret(),
                requireNonNull(queueURL), requireNonNull(region), "SQS");
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy