Package com.amazonaws.services.sns.model

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


    } catch (Exception e) {
      log.warn("Unable to delete queue: " + queueUrl, e);
    }

    try {
      sns.deleteTopic(new DeleteTopicRequest(topicArn));
    } catch (Exception e) {
      log.warn("Unable to delete topic: " + topicArn, e);
    }
  }
View Full Code Here


    } catch (Exception e) {
      log.warn("Unable to delete queue: " + queueUrl, e);
    }
   
    try {
      sns.deleteTopic(new DeleteTopicRequest(topicArn));
    } catch (Exception e) {
      log.warn("Unable to delete topic: " + topicArn, e);
    }
  }
View Full Code Here

    } catch (Exception e) {
      log.warn("Unable to delete queue: " + queueUrl, e);
    }

    try {
      sns.deleteTopic(new DeleteTopicRequest(topicArn));
    } catch (Exception e) {
      log.warn("Unable to delete topic: " + topicArn, e);
    }
  }
View Full Code Here

        } catch (Exception e) {
            log.warn("Unable to delete queue: " + queueUrl, e);
        }

        try {
            sns.deleteTopic(new DeleteTopicRequest(topicArn));
        } catch (Exception e) {
            log.warn("Unable to delete topic: " + topicArn, e);
        }
    }
View Full Code Here

    } catch (Exception e) {
      log.warn("Unable to delete queue: " + queueUrl, e);
    }

    try {
      sns.deleteTopic(new DeleteTopicRequest(topicArn));
    } catch (Exception e) {
      log.warn("Unable to delete topic: " + topicArn, e);
    }
  }
View Full Code Here

        } catch (Exception e) {
            log.warn("Unable to delete queue: " + queueUrl, e);
        }

        try {
            sns.deleteTopic(new DeleteTopicRequest(topicArn));
        } catch (Exception e) {
            log.warn("Unable to delete topic: " + topicArn, e);
        }
    }
View Full Code Here

      }
    }
    for (String key : topics.keySet()) {
      logger.info("deleting " + topics.get(key));
      if (key.endsWith("_USER1")) {
        cns1.deleteTopic(new DeleteTopicRequest(topics.get(key)));
      } else if (key.endsWith("_USER2")) {
        cns2.deleteTopic(new DeleteTopicRequest(topics.get(key)));
      } else {
        cns3.deleteTopic(new DeleteTopicRequest(topics.get(key)));
      }
    }
    CMBControllerServlet.valueAccumulator.deleteAllCounters();
  }
View Full Code Here

  }
 
  private void deleteAllTopics(AmazonSNSClient sns) {
    ListTopicsResult listTopicsResult = sns.listTopics();
    for (Topic topic : listTopicsResult.getTopics()) {
      sns.deleteTopic(new DeleteTopicRequest(topic.getTopicArn()));
    }
  }
View Full Code Here

        throw new Exception("no messages found");
      }
     
      // delete queue and topic
     
      DeleteTopicRequest  deleteTopicRequest = new DeleteTopicRequest(topicArn);
      sns.deleteTopic(deleteTopicRequest);
     
          sqs.deleteQueue(new DeleteQueueRequest(queueUrl));
         
          System.out.println("OK");
View Full Code Here

      }
   
    } else if (parameters.containsKey("Delete")) {

      try {
        DeleteTopicRequest deleteTopicRequest = new DeleteTopicRequest(arn);
        sns.deleteTopic(deleteTopicRequest);
        logger.debug("event=delete_topic topic_arn="+arn+" user_id= " + userId);
      } catch (Exception ex) {
        logger.error("event=delete_topic topic_arn="+arn+" user_id= " + userId, ex);
        throw new ServletException(ex);
      }

    } else if (parameters.containsKey("DeleteAll")) {
     
          try {
           
        ListTopicsRequest listTopicRequest = new ListTopicsRequest();
       
        if (nextToken != null) {
          listTopicRequest.setNextToken(nextToken);
        }
       
        ListTopicsResult listTopicResult = sns.listTopics(listTopicRequest);
        topics = listTopicResult.getTopics();

      } catch (Exception ex) {
        logger.error("event=list_topics user_id= " + userId, ex);
        throw new ServletException(ex);
      }
     
      for (int i = 0; topics != null && i < topics.size(); i++) {
           
            Topic t = topics.get(i);

            try {
          DeleteTopicRequest deleteTopicRequest = new DeleteTopicRequest(t.getTopicArn());
          sns.deleteTopic(deleteTopicRequest);
          logger.debug("event=delete_topic topic_arn=" + (t != null ? t.getTopicArn() : "null") + " user_id= " + userId);
        } catch (Exception ex) {
          logger.error("event=delete_topic topic_arn=" + (t != null ? t.getTopicArn() : "null") + " user_id= " + userId, ex);
        }
View Full Code Here

TOP

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

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.