@Override public ResultSegment<CloudQueue> postProcessResponse(HttpURLConnection connection, Void queue, CloudQueueClient client, OperationContext context, ResultSegment<CloudQueue> storageObject) throws Exception { final ListResponse<CloudQueue> response = QueueListHandler.getQueues(connection.getInputStream(), client); ResultContinuation newToken = null; if (response.getNextMarker() != null) { newToken = new ResultContinuation(); newToken.setNextMarker(response.getNextMarker()); newToken.setContinuationType(ResultContinuationType.QUEUE); newToken.setTargetLocation(this.getResult().getTargetLocation()); } final ResultSegment<CloudQueue> resSegment = new ResultSegment<CloudQueue>(response.getResults(), response.getMaxResults(), newToken); // Important for listQueues because this is required by the lazy iterator between executions. segmentedRequest.setToken(resSegment.getContinuationToken()); return resSegment; } };
@Override public ResultSegment<CloudQueue> postProcessResponse(HttpURLConnection connection, Void queue, CloudQueueClient client, OperationContext context, ResultSegment<CloudQueue> storageObject) throws Exception { final ListResponse<CloudQueue> response = QueueListHandler.getQueues(connection.getInputStream(), client); ResultContinuation newToken = null; if (response.getNextMarker() != null) { newToken = new ResultContinuation(); newToken.setNextMarker(response.getNextMarker()); newToken.setContinuationType(ResultContinuationType.QUEUE); newToken.setTargetLocation(this.getResult().getTargetLocation()); } final ResultSegment<CloudQueue> resSegment = new ResultSegment<CloudQueue>(response.getResults(), response.getMaxResults(), newToken); // Important for listQueues because this is required by the lazy iterator between executions. segmentedRequest.setToken(resSegment.getContinuationToken()); return resSegment; } };
@Override public ResultSegment<CloudFileShare> postProcessResponse(HttpURLConnection connection, Void share, CloudFileClient client, OperationContext context, ResultSegment<CloudFileShare> storageObject) throws Exception { final ListResponse<CloudFileShare> response = ShareListHandler.getShareList(this.getConnection() .getInputStream(), client); ResultContinuation newToken = null; if (response.getNextMarker() != null) { newToken = new ResultContinuation(); newToken.setNextMarker(response.getNextMarker()); newToken.setContinuationType(ResultContinuationType.SHARE); newToken.setTargetLocation(this.getResult().getTargetLocation()); } final ResultSegment<CloudFileShare> resSegment = new ResultSegment<CloudFileShare>( response.getResults(), response.getMaxResults(), newToken); // Important for listShares because this is required by the lazy iterator between executions. segmentedRequest.setToken(resSegment.getContinuationToken()); return resSegment; } };
@Override public ResultSegment<ListFileItem> postProcessResponse(HttpURLConnection connection, CloudFileDirectory directory, CloudFileClient client, OperationContext context, ResultSegment<ListFileItem> storageObject) throws Exception { final ListResponse<ListFileItem> response = FileListHandler.getFileAndDirectoryList(this .getConnection().getInputStream(), directory); ResultContinuation newToken = null; if (response.getNextMarker() != null) { newToken = new ResultContinuation(); newToken.setNextMarker(response.getNextMarker()); newToken.setContinuationType(ResultContinuationType.FILE); newToken.setTargetLocation(this.getResult().getTargetLocation()); } final ResultSegment<ListFileItem> resSegment = new ResultSegment<ListFileItem>(response.getResults(), response.getMaxResults(), newToken); // Important for listFilesAndDirectories because this is required by the lazy iterator between executions. segmentedRequest.setToken(resSegment.getContinuationToken()); return resSegment; } };
@Override public ResultSegment<CloudFileShare> postProcessResponse(HttpURLConnection connection, Void share, CloudFileClient client, OperationContext context, ResultSegment<CloudFileShare> storageObject) throws Exception { final ListResponse<CloudFileShare> response = ShareListHandler.getShareList(this.getConnection() .getInputStream(), client); ResultContinuation newToken = null; if (response.getNextMarker() != null) { newToken = new ResultContinuation(); newToken.setNextMarker(response.getNextMarker()); newToken.setContinuationType(ResultContinuationType.SHARE); newToken.setTargetLocation(this.getResult().getTargetLocation()); } final ResultSegment<CloudFileShare> resSegment = new ResultSegment<CloudFileShare>( response.getResults(), response.getMaxResults(), newToken); // Important for listShares because this is required by the lazy iterator between executions. segmentedRequest.setToken(resSegment.getContinuationToken()); return resSegment; } };
@Override public ResultSegment<ListFileItem> postProcessResponse(HttpURLConnection connection, CloudFileDirectory directory, CloudFileClient client, OperationContext context, ResultSegment<ListFileItem> storageObject) throws Exception { final ListResponse<ListFileItem> response = FileListHandler.getFileAndDirectoryList(this .getConnection().getInputStream(), directory); ResultContinuation newToken = null; if (response.getNextMarker() != null) { newToken = new ResultContinuation(); newToken.setNextMarker(response.getNextMarker()); newToken.setContinuationType(ResultContinuationType.FILE); newToken.setTargetLocation(this.getResult().getTargetLocation()); } final ResultSegment<ListFileItem> resSegment = new ResultSegment<ListFileItem>(response.getResults(), response.getMaxResults(), newToken); // Important for listFilesAndDirectories because this is required by the lazy iterator between executions. segmentedRequest.setToken(resSegment.getContinuationToken()); return resSegment; } };
@Override public ResultSegment<CloudBlobContainer> postProcessResponse(HttpURLConnection connection, Void container, CloudBlobClient client, OperationContext context, ResultSegment<CloudBlobContainer> storageObject) throws Exception { final ListResponse<CloudBlobContainer> response = ContainerListHandler.getContainerList(this .getConnection().getInputStream(), client); ResultContinuation newToken = null; if (response.getNextMarker() != null) { newToken = new ResultContinuation(); newToken.setNextMarker(response.getNextMarker()); newToken.setContinuationType(ResultContinuationType.CONTAINER); newToken.setTargetLocation(this.getResult().getTargetLocation()); } final ResultSegment<CloudBlobContainer> resSegment = new ResultSegment<CloudBlobContainer>( response.getResults(), response.getMaxResults(), newToken); // Important for listContainers because this is required by the lazy iterator between executions. segmentedRequest.setToken(resSegment.getContinuationToken()); return resSegment; } };
@Override public ResultSegment<CloudBlobContainer> postProcessResponse(HttpURLConnection connection, Void container, CloudBlobClient client, OperationContext context, ResultSegment<CloudBlobContainer> storageObject) throws Exception { final ListResponse<CloudBlobContainer> response = ContainerListHandler.getContainerList(this .getConnection().getInputStream(), client); ResultContinuation newToken = null; if (response.getNextMarker() != null) { newToken = new ResultContinuation(); newToken.setNextMarker(response.getNextMarker()); newToken.setContinuationType(ResultContinuationType.CONTAINER); newToken.setTargetLocation(this.getResult().getTargetLocation()); } final ResultSegment<CloudBlobContainer> resSegment = new ResultSegment<CloudBlobContainer>( response.getResults(), response.getMaxResults(), newToken); // Important for listContainers because this is required by the lazy iterator between executions. segmentedRequest.setToken(resSegment.getContinuationToken()); return resSegment; } };