本文整理汇总了Java中com.amazonaws.services.sns.AmazonSNSClient.setEndpoint方法的典型用法代码示例。如果您正苦于以下问题:Java AmazonSNSClient.setEndpoint方法的具体用法?Java AmazonSNSClient.setEndpoint怎么用?Java AmazonSNSClient.setEndpoint使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.amazonaws.services.sns.AmazonSNSClient
的用法示例。
在下文中一共展示了AmazonSNSClient.setEndpoint方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: factory
import com.amazonaws.services.sns.AmazonSNSClient; //导入方法依赖的package包/类
private void factory() {
ClientConfiguration clientConfig = new ClientConfiguration();
clientConfig.setProtocol(Protocol.HTTP);
if (isProxyMode()) {
log.info("======AWS run in proxy mode." + getProxyHost() + ":" + getProxyPort() + "======");
System.err.println("======AWS run in proxy mode." + getProxyHost() + ":" + getProxyPort()
+ "======");
clientConfig.setProxyHost(getProxyHost());
clientConfig.setProxyPort(getProxyPort());
if (getProxyUsername() != null && getProxyUsername().length() > 0)
clientConfig.setProxyUsername(getProxyUsername());
if (getProxyPassword() != null && getProxyPassword().length() > 0)
clientConfig.setProxyPassword(getProxyPassword());
} else {
log.info("======AWS run in normal mode." + "======");
System.err.println("======AWS run in normal mode." + "======");
}
credentialsProvider = this.createCredentialsProvider();
s3 = new AmazonS3Client(credentialsProvider, clientConfig);
s3.setEndpoint(s3Endpoint);
queue = new AmazonSQSClient(credentialsProvider, clientConfig);
queue.setEndpoint(sqsEndpoint);
sns = new AmazonSNSClient(credentialsProvider, clientConfig);
sns.setEndpoint(snsEndpoint);
dydbv2 = new AmazonDynamoDBClient(credentialsProvider, clientConfig);
dydbv2.setEndpoint(dynamodbEndpoint);
}
示例2: SNSMobilePush
import com.amazonaws.services.sns.AmazonSNSClient; //导入方法依赖的package包/类
public SNSMobilePush(AmazonSNSClient client,Denuncia d)
{
this.client=client;
client.setEndpoint("https://sns.us-west-2.amazonaws.com");
this.snsClientWrapper= new AmazonSNSClientWrapper(client,d);
}