本文整理汇总了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);
}
示例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;
}
};
}
示例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));
}
示例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<OperationInner> 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();
}
};
}
示例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<FileServerInner> 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();
}
};
}
示例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;
}
};
}
示例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<ProductInner> 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();
}
};
}
示例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<OperationInner> 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();
}
};
}
示例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<ManagedClusterInner> 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();
}
};
}
示例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<Product> 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();
}
};
}
示例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<CognitiveServicesAccountInner> 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();
}
};
}
示例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<PermissionInner> 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();
}
};
}
示例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<LoadBalancerInner> 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();
}
};
}
示例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<BgpServiceCommunityInner> 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();
}
};
}
示例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<SourceControlInner> 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();
}
};
}