/** * Simplified method form for invoking the DeleteTopic operation. * * @see #deleteTopicAsync(DeleteTopicRequest) */ @Override public java.util.concurrent.Future<DeleteTopicResult> deleteTopicAsync(String topicArn) { return deleteTopicAsync(new DeleteTopicRequest().withTopicArn(topicArn)); }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getTopicArn() == null) ? 0 : getTopicArn().hashCode()); return hashCode; }
/** * <p> * The ARN of the topic you want to delete. * </p> * * @param topicArn * The ARN of the topic you want to delete. * @return Returns a reference to this object so that method calls can be chained together. */ public DeleteTopicRequest withTopicArn(String topicArn) { setTopicArn(topicArn); return this; }
public void shutdown() { try { sqs.deleteQueue(new DeleteQueueRequest(queueUrl)); } 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); } }
/** * <p> * Deletes a topic and all its subscriptions. Deleting a topic might prevent * some messages previously sent to the topic from being delivered to * subscribers. This action is idempotent, so deleting a topic that does not * exist does not result in an error. * </p> * * @param topicArn <p> * The ARN of the topic you want to delete. * </p> * @throws InvalidParameterException * @throws InternalErrorException * @throws AuthorizationErrorException * @throws NotFoundException * @throws AmazonClientException If any internal errors are encountered * inside the client while attempting to make the request or * handle the response. For example if a network connection is * not available. * @throws AmazonServiceException If an error response is returned by Amazon * Simple Notification Service indicating either a problem with * the data in the request, or a server side issue. */ public void deleteTopic(String topicArn) throws AmazonServiceException, AmazonClientException { DeleteTopicRequest deleteTopicRequest = new DeleteTopicRequest(); deleteTopicRequest.setTopicArn(topicArn); deleteTopic(deleteTopicRequest); }
@Override public void delete(ResultCapture<Void> extractor) { DeleteTopicRequest request = new DeleteTopicRequest(); delete(request, extractor); }
/** * <p> * Deletes a topic and all its subscriptions. Deleting a topic might prevent * some messages previously sent to the topic from being delivered to * subscribers. This action is idempotent, so deleting a topic that does not * exist does not result in an error. * </p> * * @param topicArn <p> * The ARN of the topic you want to delete. * </p> * @throws InvalidParameterException * @throws InternalErrorException * @throws AuthorizationErrorException * @throws NotFoundException * @throws AmazonClientException If any internal errors are encountered * inside the client while attempting to make the request or * handle the response. For example if a network connection is * not available. * @throws AmazonServiceException If an error response is returned by Amazon * Simple Notification Service indicating either a problem with * the data in the request, or a server side issue. */ public void deleteTopic(String topicArn) throws AmazonServiceException, AmazonClientException { DeleteTopicRequest deleteTopicRequest = new DeleteTopicRequest(); deleteTopicRequest.setTopicArn(topicArn); deleteTopic(deleteTopicRequest); }
/** * Simplified method form for invoking the DeleteTopic operation. * * @see #deleteTopicAsync(DeleteTopicRequest) */ @Override public java.util.concurrent.Future<DeleteTopicResult> deleteTopicAsync(String topicArn) { return deleteTopicAsync(new DeleteTopicRequest().withTopicArn(topicArn)); }
@Override public void delete(ResultCapture<Void> extractor) { DeleteTopicRequest request = new DeleteTopicRequest(); delete(request, extractor); }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof DeleteTopicRequest == false) return false; DeleteTopicRequest other = (DeleteTopicRequest) obj; if (other.getTopicArn() == null ^ this.getTopicArn() == null) return false; if (other.getTopicArn() != null && other.getTopicArn().equals(this.getTopicArn()) == false) return false; return true; }
/** * Constructs a new DeleteTopicRequest object. Callers should use the setter or fluent setter (with...) methods to * initialize any additional object members. * * @param topicArn * The ARN of the topic you want to delete. */ public DeleteTopicRequest(String topicArn) { setTopicArn(topicArn); }
/** * Simplified method form for invoking the DeleteTopic operation with an AsyncHandler. * * @see #deleteTopicAsync(DeleteTopicRequest, com.amazonaws.handlers.AsyncHandler) */ @Override public java.util.concurrent.Future<DeleteTopicResult> deleteTopicAsync(String topicArn, com.amazonaws.handlers.AsyncHandler<DeleteTopicRequest, DeleteTopicResult> asyncHandler) { return deleteTopicAsync(new DeleteTopicRequest().withTopicArn(topicArn), asyncHandler); }
public void shutdown() { try { sqs.deleteQueue(new DeleteQueueRequest(queueUrl)); } 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); } }
/** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getTopicArn() != null) sb.append("TopicArn: ").append(getTopicArn()); sb.append("}"); return sb.toString(); }
/** * Constructs a new DeleteTopicRequest object. Callers should use the setter * or fluent setter (with...) methods to initialize any additional object * members. * * @param topicArn <p> * The ARN of the topic you want to delete. * </p> */ public DeleteTopicRequest(String topicArn) { setTopicArn(topicArn); }
/** * Simplified method form for invoking the DeleteTopic operation with an AsyncHandler. * * @see #deleteTopicAsync(DeleteTopicRequest, com.amazonaws.handlers.AsyncHandler) */ @Override public java.util.concurrent.Future<DeleteTopicResult> deleteTopicAsync(String topicArn, com.amazonaws.handlers.AsyncHandler<DeleteTopicRequest, DeleteTopicResult> asyncHandler) { return deleteTopicAsync(new DeleteTopicRequest().withTopicArn(topicArn), asyncHandler); }
private void cleanUp(QueueConfig config) { snsClient.unsubscribe(new UnsubscribeRequest(config.snsSubscriptionARN)); snsClient.deleteTopic(new DeleteTopicRequest(config.snsTopicARN)); sqsClient.deleteQueue(new DeleteQueueRequest(config.sqsQueueURL)); }
public Request<DeleteTopicRequest> marshall(DeleteTopicRequest deleteTopicRequest) { if (deleteTopicRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } Request<DeleteTopicRequest> request = new DefaultRequest<DeleteTopicRequest>(deleteTopicRequest, "AmazonSNS"); request.addParameter("Action", "DeleteTopic"); request.addParameter("Version", "2010-03-31"); request.setHttpMethod(HttpMethodName.POST); if (deleteTopicRequest.getTopicArn() != null) { request.addParameter("TopicArn", StringUtils.fromString(deleteTopicRequest.getTopicArn())); } return request; }
/** * Constructs a new DeleteTopicRequest object. Callers should use the setter * or fluent setter (with...) methods to initialize any additional object * members. * * @param topicArn <p> * The ARN of the topic you want to delete. * </p> */ public DeleteTopicRequest(String topicArn) { setTopicArn(topicArn); }
@Override public DeleteTopicResult deleteTopic(String topicArn) { return deleteTopic(new DeleteTopicRequest().withTopicArn(topicArn)); }