Package com.amazonaws.services.sns.model

Examples of com.amazonaws.services.sns.model.GetTopicAttributesRequest


    } else {
   
      Map<String, String> attributes = null;
     
      try {
        GetTopicAttributesRequest getTopicAttributesRequest = new GetTopicAttributesRequest(topicArn);
        GetTopicAttributesResult getTopicAttributesResult = sns.getTopicAttributes(getTopicAttributesRequest);
        attributes = getTopicAttributesResult.getAttributes();
      } catch (Exception ex) {
        logger.error("event=get_topic_attributes topic_arn= " + topicArn + " user_id= " + userId, ex);
        throw new ServletException(ex);
View Full Code Here


     
        Map<String, String> attributes = null;
        CNSTopicDeliveryPolicy deliveryPolicy = null;
       
        try {
          GetTopicAttributesRequest getTopicAttributesRequest = new GetTopicAttributesRequest(topicArn);
          GetTopicAttributesResult getTopicAttributesResult = sns.getTopicAttributes(getTopicAttributesRequest);
          attributes = getTopicAttributesResult.getAttributes();
          deliveryPolicy = new CNSTopicDeliveryPolicy(new JSONObject(attributes.get("DeliveryPolicy")));
        } catch (Exception ex) {
          logger.error("event=failed_to_get_attributes arn=" + topicArn, ex);
View Full Code Here

    for (int i = 0; topics != null && i < topics.size(); i++) {
         
          Topic t = topics.get(i);
        
      GetTopicAttributesRequest getTopicAttributesRequest = new GetTopicAttributesRequest(t.getTopicArn());
      GetTopicAttributesResult getTopicAttributesResult = sns.getTopicAttributes(getTopicAttributesRequest);
      Map<String, String> attributes = getTopicAttributesResult.getAttributes();

      out.println("<tr>");
      out.println("<form action=\"/webui/cnsuser?userId="+userId+"\" method=POST>");
View Full Code Here

    }
   
    Map<String, String> attributes = null;
   
    try {
      GetTopicAttributesRequest getTopicAttributesRequest = new GetTopicAttributesRequest(topicArn);
      GetTopicAttributesResult getTopicAttributesResult = sns.getTopicAttributes(getTopicAttributesRequest);
      attributes = getTopicAttributesResult.getAttributes();
    } catch (Exception ex) {
      logger.error("event=get_topic_attributes topic_arn=" + topicArn + " user_id=" + userId, ex);
      throw new ServletException(ex);
View Full Code Here

    try {
     
      String topicArn = getTopic(1, USR.USER1);
     
      GetTopicAttributesResult results = cns1.getTopicAttributes(new GetTopicAttributesRequest(topicArn));
     
      assertTrue("Default Effective Delivery Policy missing", results.getAttributes().get("EffectiveDeliveryPolicy") != null);

      String deliveryPolicy = results.getAttributes().get("EffectiveDeliveryPolicy");
      JSONObject dpJson = new JSONObject(deliveryPolicy);
View Full Code Here

      "}," +
      "\"defaultThrottlePolicy\":null" +
      "}}";
     
      cns1.setTopicAttributes(new SetTopicAttributesRequest(topicArn, "DeliveryPolicy", jsonStr2));
      GetTopicAttributesResult results = cns1.getTopicAttributes(new GetTopicAttributesRequest(topicArn));
      assertTrue("Default Effective Delivery Policy missing", results.getAttributes().get("EffectiveDeliveryPolicy") != null);

      String deliveryPolicy = results.getAttributes().get("EffectiveDeliveryPolicy");
      JSONObject dpJson = new JSONObject(deliveryPolicy);
     
View Full Code Here

    try {
     
      String topicArn = this.getTopic(1, USR.USER1);
      String displayName = "My Display Name !@#$%^&*()-+";
      cns1.setTopicAttributes(new SetTopicAttributesRequest(topicArn, "DisplayName", displayName));
      GetTopicAttributesResult results = cns1.getTopicAttributes(new GetTopicAttributesRequest(topicArn));
      assertTrue("Display name is " + results.getAttributes().get("DisplayName") + ", expected: " + displayName, results.getAttributes().get("DisplayName").equals(displayName));

    } catch (Exception ex) {
      logger.error("test failed", ex);
      fail(ex.getMessage());
View Full Code Here

          setTopicAttributesRequest.setAttributeName("DisplayName");
          setTopicAttributesRequest.setAttributeValue("NewDisplayName");
          setTopicAttributesRequest.setTopicArn(topicArn);
          cns2.setTopicAttributes(setTopicAttributesRequest);
     
          GetTopicAttributesRequest getTopicAttributesRequest = new GetTopicAttributesRequest();
          getTopicAttributesRequest.setTopicArn(topicArn);
          GetTopicAttributesResult result = cns1.getTopicAttributes(getTopicAttributesRequest);
         
          assertTrue("Expected display name NewDisplayName, instead found " + result.getAttributes().get("DisplayName"), result.getAttributes().get("DisplayName").equals("NewDisplayName"));
 
          RemovePermissionRequest removePermissionRequest = new RemovePermissionRequest();
View Full Code Here

TOP

Related Classes of com.amazonaws.services.sns.model.GetTopicAttributesRequest

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.