@Override public ListSubscriptionsResult listSubscriptions() { return listSubscriptions(new ListSubscriptionsRequest()); }
@Override public ListSubscriptionsResult listSubscriptions(String nextToken) { return listSubscriptions(new ListSubscriptionsRequest().withNextToken(nextToken)); }
/** * <p> * Returns a list of the requester's subscriptions. Each call returns a * limited list of subscriptions, up to 100. If there are more * subscriptions, a <code>NextToken</code> is also returned. Use the * <code>NextToken</code> parameter in a new <code>ListSubscriptions</code> * call to get further results. * </p> * * @return listSubscriptionsResult The response from the ListSubscriptions * service method, as returned by Amazon Simple Notification * Service. * @throws InvalidParameterException * @throws InternalErrorException * @throws AuthorizationErrorException * @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 ListSubscriptionsResult listSubscriptions() throws AmazonServiceException, AmazonClientException { ListSubscriptionsRequest listSubscriptionsRequest = new ListSubscriptionsRequest(); return listSubscriptions(listSubscriptionsRequest); }
ListSubscriptionsRequest listSubscriptionsRequest = new ListSubscriptionsRequest(); listSubscriptionsRequest.setNextToken(nextToken); return listSubscriptions(listSubscriptionsRequest);
/** * <p> * Returns a list of the requester's subscriptions. Each call returns a * limited list of subscriptions, up to 100. If there are more * subscriptions, a <code>NextToken</code> is also returned. Use the * <code>NextToken</code> parameter in a new <code>ListSubscriptions</code> * call to get further results. * </p> * * @return listSubscriptionsResult The response from the ListSubscriptions * service method, as returned by Amazon Simple Notification * Service. * @throws InvalidParameterException * @throws InternalErrorException * @throws AuthorizationErrorException * @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 ListSubscriptionsResult listSubscriptions() throws AmazonServiceException, AmazonClientException { ListSubscriptionsRequest listSubscriptionsRequest = new ListSubscriptionsRequest(); return listSubscriptions(listSubscriptionsRequest); }
ListSubscriptionsRequest listSubscriptionsRequest = new ListSubscriptionsRequest(); listSubscriptionsRequest.setNextToken(nextToken); return listSubscriptions(listSubscriptionsRequest);
ListSubscriptionsResult listSubscriptionDefinitionsResult; do { listSubscriptionDefinitionsResult = snsClient.listSubscriptions(new ListSubscriptionsRequest().withNextToken(nextToken)); subscriptionList.addAll(listSubscriptionDefinitionsResult.getSubscriptions()); nextToken = listSubscriptionDefinitionsResult.getNextToken();