当前位置: 首页>>代码示例>>Java>>正文


Java AmazonSNSClientBuilder类代码示例

本文整理汇总了Java中com.amazonaws.services.sns.AmazonSNSClientBuilder的典型用法代码示例。如果您正苦于以下问题:Java AmazonSNSClientBuilder类的具体用法?Java AmazonSNSClientBuilder怎么用?Java AmazonSNSClientBuilder使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


AmazonSNSClientBuilder类属于com.amazonaws.services.sns包,在下文中一共展示了AmazonSNSClientBuilder类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: setUp

import com.amazonaws.services.sns.AmazonSNSClientBuilder; //导入依赖的package包/类
/**
 *  Loads the test-specific Log4J configuration and resets the environment.
 */
public void setUp(String propertiesName)
throws Exception
{
    URL config = ClassLoader.getSystemResource(propertiesName);
    assertNotNull("missing configuration: " + propertiesName, config);

    LogManager.resetConfiguration();
    PropertyConfigurator.configure(config);

    localLogger = Logger.getLogger(getClass());

    runId = String.valueOf(System.currentTimeMillis());
    resourceName = "SNSAppenderIntegrationTest-" + runId;
    System.setProperty("SNSAppenderIntegrationTest.resourceName", resourceName);

    localSNSclient = AmazonSNSClientBuilder.defaultClient();
    localSQSclient = AmazonSQSClientBuilder.defaultClient();
}
 
开发者ID:kdgregory,项目名称:log4j-aws-appenders,代码行数:22,代码来源:SNSAppenderIntegrationTest.java

示例2: getSNSClient

import com.amazonaws.services.sns.AmazonSNSClientBuilder; //导入依赖的package包/类
/**
 * Returns an SNS client.
 *
 * <p>This method is provided so unit tests can mock out SNS.
 */
protected AmazonSNS getSNSClient() {

  // Use a getter here so unit tests can substitute a mock client
  AmazonSNS client = AmazonSNSClientBuilder.standard().withRegion(region.getName()).build();
  return client;
}
 
开发者ID:robinsteel,项目名称:Sqawsh,代码行数:12,代码来源:PageManager.java

示例3: get

import com.amazonaws.services.sns.AmazonSNSClientBuilder; //导入依赖的package包/类
@Override
public AmazonSNS get(SnsModule.EndpointConfig config) {
    AmazonSNSClientBuilder builder = AmazonSNSClientBuilder.standard();
    builder.withCredentials(credentialsProvider);
    if (config.endpoint().isPresent()) {
        builder.withEndpointConfiguration(
            new AwsClientBuilder.EndpointConfiguration(config.getEndpoint(), config.getRegionName())
        );
    } else {
        builder.withRegion(config.getRegionName());
    }
    return builder.build();
}
 
开发者ID:SmartThingsOSS,项目名称:ratpack-sqs,代码行数:14,代码来源:DefaultAmazonSNSProvider.java

示例4: createSnsClient

import com.amazonaws.services.sns.AmazonSNSClientBuilder; //导入依赖的package包/类
public AmazonSNS createSnsClient(String accessKey, String secretKey, String region) {
	String decryptedAccessKey = encryptionService.decrypt(accessKey, true);
	String decryptedSecretKey = encryptionService.decrypt(secretKey, true);

	BasicAWSCredentials credentials = new BasicAWSCredentials(decryptedAccessKey, decryptedSecretKey);
    AmazonSNS snsClient = AmazonSNSClientBuilder.standard().withRegion(Regions.fromName(region)).withCredentials(new AWSStaticCredentialsProvider(credentials)).build();
    
    return snsClient;
}
 
开发者ID:GluuFederation,项目名称:oxAuth,代码行数:10,代码来源:PushSnsService.java

示例5: createAmazonAPIClients

import com.amazonaws.services.sns.AmazonSNSClientBuilder; //导入依赖的package包/类
private void createAmazonAPIClients() {
       cfnClient = AmazonCloudFormationClientBuilder.defaultClient();
       ec2Client = AmazonEC2ClientBuilder.defaultClient();
       snsClient = AmazonSNSClientBuilder.defaultClient();
       sqsClient = AmazonSQSClientBuilder.defaultClient();
       elbClient = AmazonElasticLoadBalancingClientBuilder.defaultClient();
       s3Client = AmazonS3ClientBuilder.defaultClient();
       rdsClient = AmazonRDSClientBuilder.defaultClient();
       iamClient = AmazonIdentityManagementClientBuilder.defaultClient();
}
 
开发者ID:cartwrightian,项目名称:cfnassist,代码行数:11,代码来源:FacadeFactory.java

示例6: createNotificationClient

import com.amazonaws.services.sns.AmazonSNSClientBuilder; //导入依赖的package包/类
public static AmazonSNSClient createNotificationClient() {
    BasicCredentialsProvider credentials = BasicCredentialsProvider.standard();
    AmazonSNSClient client = !credentials.isValid() ? null : (AmazonSNSClient)
            AmazonSNSClientBuilder.standard()
            .withCredentials(credentials)
            .withRegion("eu-west-1")
            .build();
    return client;
}
 
开发者ID:wildfly-extras,项目名称:wildfly-camel,代码行数:10,代码来源:SNSUtils.java

示例7: Texter

import com.amazonaws.services.sns.AmazonSNSClientBuilder; //导入依赖的package包/类
public Texter() {
    AmazonSNSClientBuilder builder = AmazonSNSClientBuilder.standard().withCredentials(new DefaultAWSCredentialsProviderChain());
    builder.setRegion(System.getenv("Region"));
    amazonSNS = builder.build();
}
 
开发者ID:MaxPowerDarrel,项目名称:lambdatexter,代码行数:6,代码来源:Texter.java

示例8: createClient

import com.amazonaws.services.sns.AmazonSNSClientBuilder; //导入依赖的package包/类
/**
 *  The static client factory used by smoketestByArn()
 */
public static AmazonSNS createClient()
{
    return AmazonSNSClientBuilder.defaultClient();
}
 
开发者ID:kdgregory,项目名称:log4j-aws-appenders,代码行数:8,代码来源:SNSAppenderIntegrationTest.java

示例9: createSNSClient

import com.amazonaws.services.sns.AmazonSNSClientBuilder; //导入依赖的package包/类
public static AmazonSNS createSNSClient() {
       return AmazonSNSClientBuilder.defaultClient();
}
 
开发者ID:cartwrightian,项目名称:cfnassist,代码行数:4,代码来源:EnvironmentSetupForTests.java


注:本文中的com.amazonaws.services.sns.AmazonSNSClientBuilder类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。