@Override public UnsubscribeResult unsubscribe(UnsubscribeRequest unsubscribeRequest) throws AmazonClientException { if (!_subscriptionsByArn.containsKey(unsubscribeRequest.getSubscriptionArn())) throw new NotFoundException("no such subscription"); Subscription removed = _subscriptionsByArn.remove(unsubscribeRequest.getSubscriptionArn()); _subscriptionsForTopic.get(removed.getSubscriptionArn()).remove(removed.getSubscriptionArn()); return new UnsubscribeResult(); }
@Override public UnsubscribeResult unsubscribe(UnsubscribeRequest unsubscribeRequest) throws AmazonServiceException, AmazonClientException { throw new UnsupportedOperationException(); }