List of usage examples for com.amazonaws.services.ec2.model DescribeVolumesRequest setNextToken
public void setNextToken(String nextToken)
The NextToken
value returned from a previous paginated DescribeVolumes
request where MaxResults
was used and the results exceeded the value of that parameter.
From source file:com.vmware.photon.controller.model.adapters.awsadapter.enumeration.AWSBlockStorageEnumerationAdapterService.java
License:Open Source License
/** * Initializes and saves a reference to the request object that is sent to AWS to get a page of * volumes. Also saves an instance to the async handler that will be used to handle the * responses received from AWS. It sets the nextToken value in the request object sent to AWS * for getting the next page of results from AWS. * * @param aws// w w w . ja va2 s.c o m */ private void creatAWSRequestAndAsyncHandler(BlockStorageEnumerationContext aws) { DescribeVolumesRequest request = new DescribeVolumesRequest(); request.setMaxResults(getQueryPageSize()); request.setNextToken(aws.nextToken); aws.describeVolumesRequest = request; AsyncHandler<DescribeVolumesRequest, DescribeVolumesResult> resultHandler = new AWSStorageEnumerationAsyncHandler( this, aws); aws.resultHandler = resultHandler; }