当前位置: 首页>>代码示例>>Java>>正文


Java PagedList类代码示例

本文整理汇总了Java中com.microsoft.azure.PagedList的典型用法代码示例。如果您正苦于以下问题:Java PagedList类的具体用法?Java PagedList怎么用?Java PagedList使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


PagedList类属于com.microsoft.azure包,在下文中一共展示了PagedList类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: setup

import com.microsoft.azure.PagedList; //导入依赖的package包/类
@Before
public void setup() {

    PagedList<SecretItem> mockResult = new PagedList<SecretItem>() {
        @Override
        public Page<SecretItem> nextPage(String s) throws RestException, IOException {
            final MockPage page = new MockPage();
            return page;
        }
    };

    final SecretItem secretItem = new SecretItem();
    secretItem.withId(testPropertyName1);
    mockResult.add(secretItem);

    final SecretBundle secretBundle = new SecretBundle();
    secretBundle.withValue(testPropertyName1);
    secretBundle.withId(testPropertyName1);


    when(keyVaultClient.listSecrets(anyString())).thenReturn(mockResult);
    when(keyVaultClient.getSecret(anyString(), anyString())).thenReturn(secretBundle);

    keyVaultOperation = new KeyVaultOperation(keyVaultClient, fakeVaultUri);
}
 
开发者ID:Microsoft,项目名称:azure-spring-boot,代码行数:26,代码来源:KeyVaultOperationUnitTest.java

示例2: toPagedList

import com.microsoft.azure.PagedList; //导入依赖的package包/类
/**
 * Util function to block on an observable and turn that to a paged list with one page.
 *
 * @param skuObservable the observable
 * @param <T> the item type
 * @return a paged list with items collected from the given observable
 */
private static <T> PagedList<T> toPagedList(final Observable<T> skuObservable) {
    Page<T> singlePage = new Page<T>() {
        @Override
        public List<T> items() {
            return Lists.newArrayList(skuObservable.toBlocking().toIterable());
        }

        @Override
        public String nextPageLink() {
            return null;
        }
    };
    return new PagedList<T>(singlePage) {
        @Override
        public Page<T> nextPage(String s) throws RestException, IOException {
            return null;
        }
    };
}
 
开发者ID:Azure,项目名称:azure-libraries-for-java,代码行数:27,代码来源:ComputeSkusImpl.java

示例3: list

import com.microsoft.azure.PagedList; //导入依赖的package包/类
@Override
public PagedList<Webhook> list(final String resourceGroupName, final String registryName) {
    final WebhooksClientImpl self = this;
    final PagedListConverter<WebhookInner, Webhook> converter = new PagedListConverter<WebhookInner, Webhook>() {
        @Override
        public Observable<Webhook> typeConvertAsync(WebhookInner inner) {
            if (self.containerRegistry != null) {
                return new WebhookImpl(inner.name(), self.containerRegistry, inner, self.containerRegistryManager).setCallbackConfigAsync();
            } else {
                return Observable.just((Webhook) new WebhookImpl(resourceGroupName, registryName, inner.name(), inner, self.containerRegistryManager));
            }
        }
    };

    return converter.convert(this.containerRegistryManager.inner().webhooks().list(resourceGroupName, registryName));
}
 
开发者ID:Azure,项目名称:azure-libraries-for-java,代码行数:17,代码来源:WebhooksClientImpl.java

示例4: list

import com.microsoft.azure.PagedList; //导入依赖的package包/类
/**
 * Lists available operations for the Microsoft.ManagedIdentity provider.
 *
 * @throws IllegalArgumentException thrown if parameters fail the validation
 * @throws CloudException thrown if the request is rejected by server
 * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
 * @return the PagedList&lt;OperationInner&gt; object if successful.
 */
public PagedList<OperationInner> list() {
    ServiceResponse<Page<OperationInner>> response = listSinglePageAsync().toBlocking().single();
    return new PagedList<OperationInner>(response.body()) {
        @Override
        public Page<OperationInner> nextPage(String nextPageLink) {
            return listNextSinglePageAsync(nextPageLink).toBlocking().single().body();
        }
    };
}
 
开发者ID:Azure,项目名称:azure-libraries-for-java,代码行数:18,代码来源:OperationsInner.java

示例5: list

import com.microsoft.azure.PagedList; //导入依赖的package包/类
/**
 * To list all the file servers available under the given subscription (and across all resource groups within that subscription).
 *
 * @throws IllegalArgumentException thrown if parameters fail the validation
 * @throws CloudException thrown if the request is rejected by server
 * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
 * @return the PagedList&lt;FileServerInner&gt; object if successful.
 */
public PagedList<FileServerInner> list() {
    ServiceResponse<Page<FileServerInner>> response = listSinglePageAsync().toBlocking().single();
    return new PagedList<FileServerInner>(response.body()) {
        @Override
        public Page<FileServerInner> nextPage(String nextPageLink) {
            return listNextSinglePageAsync(nextPageLink).toBlocking().single().body();
        }
    };
}
 
开发者ID:Azure,项目名称:azure-libraries-for-java,代码行数:18,代码来源:FileServersInner.java

示例6: list

import com.microsoft.azure.PagedList; //导入依赖的package包/类
/**
 * Gets the current usage count and the limit for the resources under the subscription.
 *
 * @return the PagedList<UsageInner> object if successful.
 */
public PagedList<UsageInner> list() {
    PageImpl<UsageInner> page = new PageImpl<>();
    page.setItems(listWithServiceResponseAsync().toBlocking().single().body());
    page.setNextPageLink(null);
    return new PagedList<UsageInner>(page) {
        @Override
        public Page<UsageInner> nextPage(String nextPageLink) {
            return null;
        }
    };
}
 
开发者ID:Azure,项目名称:azure-libraries-for-java,代码行数:17,代码来源:UsagesInner.java

示例7: getSinglePagesFailure

import com.microsoft.azure.PagedList; //导入依赖的package包/类
/**
 * A paging operation that receives a 400 on the first call.
 *
 * @throws IllegalArgumentException thrown if parameters fail the validation
 * @throws CloudException thrown if the request is rejected by server
 * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
 * @return the PagedList&lt;ProductInner&gt; object if successful.
 */
public PagedList<ProductInner> getSinglePagesFailure() {
    ServiceResponse<Page<ProductInner>> response = getSinglePagesFailureSinglePageAsync().toBlocking().single();
    return new PagedList<ProductInner>(response.body()) {
        @Override
        public Page<ProductInner> nextPage(String nextPageLink) {
            return getSinglePagesFailureNextSinglePageAsync(nextPageLink).toBlocking().single().body();
        }
    };
}
 
开发者ID:Azure,项目名称:autorest.java,代码行数:18,代码来源:PagingsInner.java

示例8: list

import com.microsoft.azure.PagedList; //导入依赖的package包/类
/**
 * Lists available operations for the Microsoft.BatchAI provider.
 *
 * @throws IllegalArgumentException thrown if parameters fail the validation
 * @throws CloudException thrown if the request is rejected by server
 * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
 * @return the PagedList&lt;OperationInner&gt; object if successful.
 */
public PagedList<OperationInner> list() {
    ServiceResponse<Page<OperationInner>> response = listSinglePageAsync().toBlocking().single();
    return new PagedList<OperationInner>(response.body()) {
        @Override
        public Page<OperationInner> nextPage(String nextPageLink) {
            return listNextSinglePageAsync(nextPageLink).toBlocking().single().body();
        }
    };
}
 
开发者ID:Azure,项目名称:azure-libraries-for-java,代码行数:18,代码来源:OperationsInner.java

示例9: list

import com.microsoft.azure.PagedList; //导入依赖的package包/类
/**
 * Gets a list of managed clusters in the specified subscription.
 * Gets a list of managed clusters in the specified subscription. The operation returns properties of each managed cluster.
 *
 * @throws IllegalArgumentException thrown if parameters fail the validation
 * @throws CloudException thrown if the request is rejected by server
 * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
 * @return the PagedList&lt;ManagedClusterInner&gt; object if successful.
 */
public PagedList<ManagedClusterInner> list() {
    ServiceResponse<Page<ManagedClusterInner>> response = listSinglePageAsync().toBlocking().single();
    return new PagedList<ManagedClusterInner>(response.body()) {
        @Override
        public Page<ManagedClusterInner> nextPage(String nextPageLink) {
            return listNextSinglePageAsync(nextPageLink).toBlocking().single().body();
        }
    };
}
 
开发者ID:Azure,项目名称:azure-libraries-for-java,代码行数:19,代码来源:ManagedClustersInner.java

示例10: getSinglePagesFailure

import com.microsoft.azure.PagedList; //导入依赖的package包/类
/**
 * A paging operation that receives a 400 on the first call.
 *
 * @throws IllegalArgumentException thrown if parameters fail the validation
 * @throws CloudException thrown if the request is rejected by server
 * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
 * @return the PagedList&lt;Product&gt; object if successful.
 */
public PagedList<Product> getSinglePagesFailure() {
    ServiceResponse<Page<Product>> response = getSinglePagesFailureSinglePageAsync().toBlocking().single();
    return new PagedList<Product>(response.body()) {
        @Override
        public Page<Product> nextPage(String nextPageLink) {
            return getSinglePagesFailureNextSinglePageAsync(nextPageLink).toBlocking().single().body();
        }
    };
}
 
开发者ID:Azure,项目名称:autorest.java,代码行数:18,代码来源:PagingsImpl.java

示例11: listByResourceGroup

import com.microsoft.azure.PagedList; //导入依赖的package包/类
/**
 * Returns all the resources of a particular type belonging to a resource group.
 *
 * @param resourceGroupName The name of the resource group within the user's subscription.
 * @throws IllegalArgumentException thrown if parameters fail the validation
 * @throws ErrorException thrown if the request is rejected by server
 * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
 * @return the PagedList&lt;CognitiveServicesAccountInner&gt; object if successful.
 */
public PagedList<CognitiveServicesAccountInner> listByResourceGroup(final String resourceGroupName) {
    ServiceResponse<Page<CognitiveServicesAccountInner>> response = listByResourceGroupSinglePageAsync(resourceGroupName).toBlocking().single();
    return new PagedList<CognitiveServicesAccountInner>(response.body()) {
        @Override
        public Page<CognitiveServicesAccountInner> nextPage(String nextPageLink) {
            return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body();
        }
    };
}
 
开发者ID:Azure,项目名称:azure-libraries-for-java,代码行数:19,代码来源:AccountsInner.java

示例12: listForResourceGroup

import com.microsoft.azure.PagedList; //导入依赖的package包/类
/**
 * Gets all permissions the caller has for a resource group.
 *
 * @param resourceGroupName The name of the resource group to get the permissions for. The name is case insensitive.
 * @throws IllegalArgumentException thrown if parameters fail the validation
 * @throws CloudException thrown if the request is rejected by server
 * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
 * @return the PagedList&lt;PermissionInner&gt; object if successful.
 */
public PagedList<PermissionInner> listForResourceGroup(final String resourceGroupName) {
    ServiceResponse<Page<PermissionInner>> response = listForResourceGroupSinglePageAsync(resourceGroupName).toBlocking().single();
    return new PagedList<PermissionInner>(response.body()) {
        @Override
        public Page<PermissionInner> nextPage(String nextPageLink) {
            return listForResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body();
        }
    };
}
 
开发者ID:Azure,项目名称:azure-libraries-for-java,代码行数:19,代码来源:PermissionsInner.java

示例13: list

import com.microsoft.azure.PagedList; //导入依赖的package包/类
/**
 * Gets all the load balancers in a subscription.
 *
 * @throws IllegalArgumentException thrown if parameters fail the validation
 * @throws CloudException thrown if the request is rejected by server
 * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
 * @return the PagedList&lt;LoadBalancerInner&gt; object if successful.
 */
public PagedList<LoadBalancerInner> list() {
    ServiceResponse<Page<LoadBalancerInner>> response = listSinglePageAsync().toBlocking().single();
    return new PagedList<LoadBalancerInner>(response.body()) {
        @Override
        public Page<LoadBalancerInner> nextPage(String nextPageLink) {
            return listNextSinglePageAsync(nextPageLink).toBlocking().single().body();
        }
    };
}
 
开发者ID:Azure,项目名称:azure-libraries-for-java,代码行数:18,代码来源:LoadBalancersInner.java

示例14: list

import com.microsoft.azure.PagedList; //导入依赖的package包/类
/**
 * Gets all the available bgp service communities.
 *
 * @throws IllegalArgumentException thrown if parameters fail the validation
 * @throws CloudException thrown if the request is rejected by server
 * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
 * @return the PagedList&lt;BgpServiceCommunityInner&gt; object if successful.
 */
public PagedList<BgpServiceCommunityInner> list() {
    ServiceResponse<Page<BgpServiceCommunityInner>> response = listSinglePageAsync().toBlocking().single();
    return new PagedList<BgpServiceCommunityInner>(response.body()) {
        @Override
        public Page<BgpServiceCommunityInner> nextPage(String nextPageLink) {
            return listNextSinglePageAsync(nextPageLink).toBlocking().single().body();
        }
    };
}
 
开发者ID:Azure,项目名称:azure-libraries-for-java,代码行数:18,代码来源:BgpServiceCommunitiesInner.java

示例15: listSourceControls

import com.microsoft.azure.PagedList; //导入依赖的package包/类
/**
 * Gets the source controls available for Azure websites.
 * Gets the source controls available for Azure websites.
 *
 * @throws IllegalArgumentException thrown if parameters fail the validation
 * @throws CloudException thrown if the request is rejected by server
 * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
 * @return the PagedList&lt;SourceControlInner&gt; object if successful.
 */
public PagedList<SourceControlInner> listSourceControls() {
    ServiceResponse<Page<SourceControlInner>> response = listSourceControlsSinglePageAsync().toBlocking().single();
    return new PagedList<SourceControlInner>(response.body()) {
        @Override
        public Page<SourceControlInner> nextPage(String nextPageLink) {
            return listSourceControlsNextSinglePageAsync(nextPageLink).toBlocking().single().body();
        }
    };
}
 
开发者ID:Azure,项目名称:azure-libraries-for-java,代码行数:19,代码来源:WebSiteManagementClientImpl.java


注:本文中的com.microsoft.azure.PagedList类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。