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


Java GetSubscriptionAttributesResult类代码示例

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


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

示例1: testSetGetSubscriptionAttributes_shouldSetAndRespondSubscriptionAttributes

import com.amazonaws.services.sns.model.GetSubscriptionAttributesResult; //导入依赖的package包/类
@Test
public void testSetGetSubscriptionAttributes_shouldSetAndRespondSubscriptionAttributes() {
  mockSns(new MockParameters());
  // create topic and subscription
  CreateTopicResult topicResult = sns.createTopic(new CreateTopicRequest().withName("important-topic"));
  SubscribeResult subscribeResult = sns.subscribe(new SubscribeRequest().withTopicArn(topicResult.getTopicArn())
      .withProtocol("sqs").withEndpoint("arn:aws:sqs:us-east-1:123456789012:queue1"));
  // set subscription attribute
  SetSubscriptionAttributesResult setAttrResult =  sns.setSubscriptionAttributes(new SetSubscriptionAttributesRequest()
      .withAttributeName("unicorns-exist").withAttributeValue("only in scotland").withSubscriptionArn(subscribeResult.getSubscriptionArn()));
  assertNotNull("verify setting attributes result", setAttrResult);
  // get subscription attribute
  GetSubscriptionAttributesResult subAttributes = sns.getSubscriptionAttributes(new GetSubscriptionAttributesRequest()
      .withSubscriptionArn(subscribeResult.getSubscriptionArn()));
  assertEquals("verify subscription attribute","only in scotland",subAttributes.getAttributes().get("unicorns-exist"));
}
 
开发者ID:daflockinger,项目名称:unitstack,代码行数:17,代码来源:MockSnsTest.java

示例2: load

import com.amazonaws.services.sns.model.GetSubscriptionAttributesResult; //导入依赖的package包/类
@Override
public boolean load(GetSubscriptionAttributesRequest request,
        ResultCapture<GetSubscriptionAttributesResult> extractor) {

    return resource.load(request, extractor);
}
 
开发者ID:awslabs,项目名称:aws-sdk-java-resources,代码行数:7,代码来源:SubscriptionImpl.java

示例3: load

import com.amazonaws.services.sns.model.GetSubscriptionAttributesResult; //导入依赖的package包/类
/**
 * Makes a call to the service to load this resource's attributes if they
 * are not loaded yet, and use a ResultCapture to retrieve the low-level
 * client response
 * The following request parameters will be populated from the data of this
 * <code>Subscription</code> resource, and any conflicting parameter value
 * set in the request will be overridden:
 * <ul>
 *   <li>
 *     <b><code>SubscriptionArn</code></b>
 *         - mapped from the <code>Arn</code> identifier.
 *   </li>
 * </ul>
 *
 * <p>
 *
 * @return Returns {@code true} if the resource is not yet loaded when this
 *         method was invoked, which indicates that a service call has been
 *         made to retrieve the attributes.
 * @see GetSubscriptionAttributesRequest
 */
boolean load(GetSubscriptionAttributesRequest request,
        ResultCapture<GetSubscriptionAttributesResult> extractor);
 
开发者ID:awslabs,项目名称:aws-sdk-java-resources,代码行数:24,代码来源:Subscription.java


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