@Override public DeleteTopicResult deleteTopic(DeleteTopicRequest deleteTopicRequest) throws AmazonClientException { List<String> subscriptions = Objects.firstNonNull( _subscriptionsForTopic.remove(deleteTopicRequest.getTopicArn()), new ArrayList<String>()); for (String subscription : subscriptions) { _subscriptionsByArn.remove(subscription); } return new DeleteTopicResult(); }
@Test public void testDeleteTopic_withNoRequestParams_shouldWork() { mockSns(new MockParameters()); assertNotNull(sns.deleteTopic(new DeleteTopicRequest())); }
@Override public DeleteTopicResult deleteTopic(DeleteTopicRequest deleteTopicRequest) throws AmazonServiceException, AmazonClientException { throw new UnsupportedOperationException(); }
@Override public void delete(DeleteTopicRequest request) { delete(request, null); }
@Override public void delete(DeleteTopicRequest request, ResultCapture<Void> extractor ) { resource.performAction("Delete", request, extractor); }
@Override public void delete(ResultCapture<Void> extractor) { DeleteTopicRequest request = new DeleteTopicRequest(); delete(request, extractor); }
/** * Performs the <code>Delete</code> action. * * <p> * The following request parameters will be populated from the data of this * <code>Topic</code> resource, and any conflicting parameter value set in * the request will be overridden: * <ul> * <li> * <b><code>TopicArn</code></b> * - mapped from the <code>Arn</code> identifier. * </li> * </ul> * * <p> * * @see DeleteTopicRequest */ void delete(DeleteTopicRequest request);
/** * Performs the <code>Delete</code> action and use a ResultCapture to * retrieve the low-level client response. * * <p> * The following request parameters will be populated from the data of this * <code>Topic</code> resource, and any conflicting parameter value set in * the request will be overridden: * <ul> * <li> * <b><code>TopicArn</code></b> * - mapped from the <code>Arn</code> identifier. * </li> * </ul> * * <p> * * @see DeleteTopicRequest */ void delete(DeleteTopicRequest request, ResultCapture<Void> extractor);