Example usage for com.amazonaws.services.sns.model ListSubscriptionsByTopicRequest withNextToken

List of usage examples for com.amazonaws.services.sns.model ListSubscriptionsByTopicRequest withNextToken

Introduction

In this page you can find the example usage for com.amazonaws.services.sns.model ListSubscriptionsByTopicRequest withNextToken.

Prototype


public ListSubscriptionsByTopicRequest withNextToken(String nextToken) 

Source Link

Document

Token returned by the previous ListSubscriptionsByTopic request.

Usage

From source file:com.zotoh.cloudapi.aws.SNS.java

License:Open Source License

private Tuple listSubsWithTopic(String topic, String nextToken) {
    ListSubscriptionsByTopicRequest req = new ListSubscriptionsByTopicRequest().withTopicArn(topic);
    if (!isEmpty(nextToken)) {
        req.withNextToken(nextToken);
    }/* w  ww .j a v  a2 s.  c om*/
    ListSubscriptionsByTopicResult res = _svc.getCloud().getSNS().listSubscriptionsByTopic(req);
    List<com.amazonaws.services.sns.model.Subscription> lst = null;
    String tkn = null;
    if (res != null) {
        lst = res.getSubscriptions();
        tkn = res.getNextToken();
    }
    return new Tuple(lst, tkn);
}