com.microsoft.rest.ServiceFuture Java Examples

The following examples show how to use com.microsoft.rest.ServiceFuture. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: AvailableEndpointServicesInner.java    From azure-libraries-for-java with MIT License 5 votes vote down vote up
/**
 * List what values of endpoint services are available for use.
 *
 * @param location The location to check available endpoint services.
 * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
 * @throws IllegalArgumentException thrown if parameters fail the validation
 * @return the {@link ServiceFuture} object
 */
public ServiceFuture<List<EndpointServiceResultInner>> listAsync(final String location, final ListOperationCallback<EndpointServiceResultInner> serviceCallback) {
    return AzureServiceFuture.fromPageResponse(
        listSinglePageAsync(location),
        new Func1<String, Observable<ServiceResponse<Page<EndpointServiceResultInner>>>>() {
            @Override
            public Observable<ServiceResponse<Page<EndpointServiceResultInner>>> call(String nextPageLink) {
                return listNextSinglePageAsync(nextPageLink);
            }
        },
        serviceCallback);
}
 
Example #2
Source File: StorageAccountsImpl.java    From azure-libraries-for-java with MIT License 5 votes vote down vote up
/**
 * Lists the Azure Storage containers, if any, associated with the specified Data Lake Analytics and Azure Storage account combination. The response includes a link to the next page of results, if any.
 *
 * @param resourceGroupName The name of the Azure resource group.
 * @param accountName The name of the Data Lake Analytics account.
 * @param storageAccountName The name of the Azure storage account from which to list blob containers.
 * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
 * @throws IllegalArgumentException thrown if parameters fail the validation
 * @return the {@link ServiceFuture} object
 */
public ServiceFuture<List<StorageContainer>> listStorageContainersAsync(final String resourceGroupName, final String accountName, final String storageAccountName, final ListOperationCallback<StorageContainer> serviceCallback) {
    return AzureServiceFuture.fromPageResponse(
        listStorageContainersSinglePageAsync(resourceGroupName, accountName, storageAccountName),
        new Func1<String, Observable<ServiceResponse<Page<StorageContainer>>>>() {
            @Override
            public Observable<ServiceResponse<Page<StorageContainer>>> call(String nextPageLink) {
                return listStorageContainersNextSinglePageAsync(nextPageLink);
            }
        },
        serviceCallback);
}
 
Example #3
Source File: ResourceSkusInner.java    From azure-libraries-for-java with MIT License 5 votes vote down vote up
/**
 * Gets the list of Microsoft.Compute SKUs available for your Subscription.
 *
 * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
 * @throws IllegalArgumentException thrown if parameters fail the validation
 * @return the {@link ServiceFuture} object
 */
public ServiceFuture<List<ResourceSkuInner>> listAsync(final ListOperationCallback<ResourceSkuInner> serviceCallback) {
    return AzureServiceFuture.fromPageResponse(
        listSinglePageAsync(),
        new Func1<String, Observable<ServiceResponse<Page<ResourceSkuInner>>>>() {
            @Override
            public Observable<ServiceResponse<Page<ResourceSkuInner>>> call(String nextPageLink) {
                return listNextSinglePageAsync(nextPageLink);
            }
        },
        serviceCallback);
}
 
Example #4
Source File: OriginsInner.java    From azure-libraries-for-java with MIT License 5 votes vote down vote up
/**
 * Lists all of the existing origins within an endpoint.
 *
 * @param resourceGroupName Name of the Resource group within the Azure subscription.
 * @param profileName Name of the CDN profile which is unique within the resource group.
 * @param endpointName Name of the endpoint under the profile which is unique globally.
 * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
 * @throws IllegalArgumentException thrown if parameters fail the validation
 * @return the {@link ServiceFuture} object
 */
public ServiceFuture<List<OriginInner>> listByEndpointAsync(final String resourceGroupName, final String profileName, final String endpointName, final ListOperationCallback<OriginInner> serviceCallback) {
    return AzureServiceFuture.fromPageResponse(
        listByEndpointSinglePageAsync(resourceGroupName, profileName, endpointName),
        new Func1<String, Observable<ServiceResponse<Page<OriginInner>>>>() {
            @Override
            public Observable<ServiceResponse<Page<OriginInner>>> call(String nextPageLink) {
                return listByEndpointNextSinglePageAsync(nextPageLink);
            }
        },
        serviceCallback);
}
 
Example #5
Source File: DeploymentOperationsInner.java    From azure-libraries-for-java with MIT License 5 votes vote down vote up
/**
 * Gets all deployments operations for a deployment.
 *
 * @param resourceGroupName The name of the resource group. The name is case insensitive.
 * @param deploymentName The name of the deployment.
 * @param top The number of results to return.
 * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
 * @throws IllegalArgumentException thrown if parameters fail the validation
 * @return the {@link ServiceFuture} object
 */
public ServiceFuture<List<DeploymentOperationInner>> listByResourceGroupAsync(final String resourceGroupName, final String deploymentName, final Integer top, final ListOperationCallback<DeploymentOperationInner> serviceCallback) {
    return AzureServiceFuture.fromPageResponse(
        listByResourceGroupSinglePageAsync(resourceGroupName, deploymentName, top),
        new Func1<String, Observable<ServiceResponse<Page<DeploymentOperationInner>>>>() {
            @Override
            public Observable<ServiceResponse<Page<DeploymentOperationInner>>> call(String nextPageLink) {
                return listByResourceGroupNextSinglePageAsync(nextPageLink);
            }
        },
        serviceCallback);
}
 
Example #6
Source File: WorkspacesInner.java    From azure-libraries-for-java with MIT License 5 votes vote down vote up
/**
 * Gets a list of Workspaces within the specified resource group.
 *
 * @param resourceGroupName Name of the resource group to which the resource belongs.
 * @param workspacesListByResourceGroupOptions Additional parameters for the operation
 * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
 * @throws IllegalArgumentException thrown if parameters fail the validation
 * @return the {@link ServiceFuture} object
 */
public ServiceFuture<List<WorkspaceInner>> listByResourceGroupAsync(final String resourceGroupName, final WorkspacesListByResourceGroupOptions workspacesListByResourceGroupOptions, final ListOperationCallback<WorkspaceInner> serviceCallback) {
    return AzureServiceFuture.fromPageResponse(
        listByResourceGroupSinglePageAsync(resourceGroupName, workspacesListByResourceGroupOptions),
        new Func1<String, Observable<ServiceResponse<Page<WorkspaceInner>>>>() {
            @Override
            public Observable<ServiceResponse<Page<WorkspaceInner>>> call(String nextPageLink) {
                return listByResourceGroupNextSinglePageAsync(nextPageLink);
            }
        },
        serviceCallback);
}
 
Example #7
Source File: JobVersionsInner.java    From azure-libraries-for-java with MIT License 5 votes vote down vote up
/**
 * Gets all versions of a job.
 *
 * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
 * @param serverName The name of the server.
 * @param jobAgentName The name of the job agent.
 * @param jobName The name of the job to get.
 * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
 * @throws IllegalArgumentException thrown if parameters fail the validation
 * @return the {@link ServiceFuture} object
 */
public ServiceFuture<List<JobVersionInner>> listByJobAsync(final String resourceGroupName, final String serverName, final String jobAgentName, final String jobName, final ListOperationCallback<JobVersionInner> serviceCallback) {
    return AzureServiceFuture.fromPageResponse(
        listByJobSinglePageAsync(resourceGroupName, serverName, jobAgentName, jobName),
        new Func1<String, Observable<ServiceResponse<Page<JobVersionInner>>>>() {
            @Override
            public Observable<ServiceResponse<Page<JobVersionInner>>> call(String nextPageLink) {
                return listByJobNextSinglePageAsync(nextPageLink);
            }
        },
        serviceCallback);
}
 
Example #8
Source File: NamespacesInner.java    From azure-libraries-for-java with MIT License 5 votes vote down vote up
/**
 * Gets all the available namespaces within the subscription, irrespective of the resource groups.
 *
 * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
 * @throws IllegalArgumentException thrown if parameters fail the validation
 * @return the {@link ServiceFuture} object
 */
public ServiceFuture<List<NamespaceInner>> listAsync(final ListOperationCallback<NamespaceInner> serviceCallback) {
    return AzureServiceFuture.fromPageResponse(
        listSinglePageAsync(),
        new Func1<String, Observable<ServiceResponse<Page<NamespaceInner>>>>() {
            @Override
            public Observable<ServiceResponse<Page<NamespaceInner>>> call(String nextPageLink) {
                return listNextSinglePageAsync(nextPageLink);
            }
        },
        serviceCallback);
}
 
Example #9
Source File: AvailabilitySetsInner.java    From azure-libraries-for-java with MIT License 5 votes vote down vote up
/**
 * Lists all availability sets in a subscription.
 *
 * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
 * @throws IllegalArgumentException thrown if parameters fail the validation
 * @return the {@link ServiceFuture} object
 */
public ServiceFuture<List<AvailabilitySetInner>> listAsync(final ListOperationCallback<AvailabilitySetInner> serviceCallback) {
    return AzureServiceFuture.fromPageResponse(
        listSinglePageAsync(),
        new Func1<String, Observable<ServiceResponse<Page<AvailabilitySetInner>>>>() {
            @Override
            public Observable<ServiceResponse<Page<AvailabilitySetInner>>> call(String nextPageLink) {
                return listNextSinglePageAsync(nextPageLink);
            }
        },
        serviceCallback);
}
 
Example #10
Source File: EncryptionProtectorsInner.java    From azure-libraries-for-java with MIT License 5 votes vote down vote up
/**
 * Gets a list of server encryption protectors.
 *
 * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
 * @param serverName The name of the server.
 * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
 * @throws IllegalArgumentException thrown if parameters fail the validation
 * @return the {@link ServiceFuture} object
 */
public ServiceFuture<List<EncryptionProtectorInner>> listByServerAsync(final String resourceGroupName, final String serverName, final ListOperationCallback<EncryptionProtectorInner> serviceCallback) {
    return AzureServiceFuture.fromPageResponse(
        listByServerSinglePageAsync(resourceGroupName, serverName),
        new Func1<String, Observable<ServiceResponse<Page<EncryptionProtectorInner>>>>() {
            @Override
            public Observable<ServiceResponse<Page<EncryptionProtectorInner>>> call(String nextPageLink) {
                return listByServerNextSinglePageAsync(nextPageLink);
            }
        },
        serviceCallback);
}
 
Example #11
Source File: PrivateLinkServicesInner.java    From azure-libraries-for-java with MIT License 5 votes vote down vote up
/**
 * Gets all private link services in a resource group.
 *
 * @param resourceGroupName The name of the resource group.
 * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
 * @throws IllegalArgumentException thrown if parameters fail the validation
 * @return the {@link ServiceFuture} object
 */
public ServiceFuture<List<PrivateLinkServiceInner>> listByResourceGroupAsync(final String resourceGroupName, final ListOperationCallback<PrivateLinkServiceInner> serviceCallback) {
    return AzureServiceFuture.fromPageResponse(
        listByResourceGroupSinglePageAsync(resourceGroupName),
        new Func1<String, Observable<ServiceResponse<Page<PrivateLinkServiceInner>>>>() {
            @Override
            public Observable<ServiceResponse<Page<PrivateLinkServiceInner>>> call(String nextPageLink) {
                return listByResourceGroupNextSinglePageAsync(nextPageLink);
            }
        },
        serviceCallback);
}
 
Example #12
Source File: ApplicationPackagesInner.java    From azure-libraries-for-java with MIT License 5 votes vote down vote up
/**
 * Lists all of the application packages in the specified application.
 *
 * @param resourceGroupName The name of the resource group that contains the Batch account.
 * @param accountName The name of the Batch account.
 * @param applicationName The name of the application. This must be unique within the account.
 * @param maxresults The maximum number of items to return in the response.
 * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
 * @throws IllegalArgumentException thrown if parameters fail the validation
 * @return the {@link ServiceFuture} object
 */
public ServiceFuture<List<ApplicationPackageInner>> listAsync(final String resourceGroupName, final String accountName, final String applicationName, final Integer maxresults, final ListOperationCallback<ApplicationPackageInner> serviceCallback) {
    return AzureServiceFuture.fromPageResponse(
        listSinglePageAsync(resourceGroupName, accountName, applicationName, maxresults),
        new Func1<String, Observable<ServiceResponse<Page<ApplicationPackageInner>>>>() {
            @Override
            public Observable<ServiceResponse<Page<ApplicationPackageInner>>> call(String nextPageLink) {
                return listNextSinglePageAsync(nextPageLink);
            }
        },
        serviceCallback);
}
 
Example #13
Source File: DeploymentOperationsInner.java    From azure-libraries-for-java with MIT License 5 votes vote down vote up
/**
 * Gets all deployments operations for a deployment.
 *
 * @param groupId The management group ID.
 * @param deploymentName The name of the deployment.
 * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
 * @throws IllegalArgumentException thrown if parameters fail the validation
 * @return the {@link ServiceFuture} object
 */
public ServiceFuture<List<DeploymentOperationInner>> listAtManagementGroupScopeAsync(final String groupId, final String deploymentName, final ListOperationCallback<DeploymentOperationInner> serviceCallback) {
    return AzureServiceFuture.fromPageResponse(
        listAtManagementGroupScopeSinglePageAsync(groupId, deploymentName),
        new Func1<String, Observable<ServiceResponse<Page<DeploymentOperationInner>>>>() {
            @Override
            public Observable<ServiceResponse<Page<DeploymentOperationInner>>> call(String nextPageLink) {
                return listAtManagementGroupScopeNextSinglePageAsync(nextPageLink);
            }
        },
        serviceCallback);
}
 
Example #14
Source File: ResourceUsagesInner.java    From azure-libraries-for-java with MIT License 5 votes vote down vote up
/**
 * Check the quota and actual usage of the CDN profiles under the given subscription.
 *
 * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
 * @throws IllegalArgumentException thrown if parameters fail the validation
 * @return the {@link ServiceFuture} object
 */
public ServiceFuture<List<ResourceUsageInner>> listAsync(final ListOperationCallback<ResourceUsageInner> serviceCallback) {
    return AzureServiceFuture.fromPageResponse(
        listSinglePageAsync(),
        new Func1<String, Observable<ServiceResponse<Page<ResourceUsageInner>>>>() {
            @Override
            public Observable<ServiceResponse<Page<ResourceUsageInner>>> call(String nextPageLink) {
                return listNextSinglePageAsync(nextPageLink);
            }
        },
        serviceCallback);
}
 
Example #15
Source File: DomainsInner.java    From azure-libraries-for-java with MIT License 5 votes vote down vote up
/**
 * Get all domains in a resource group.
 * Description for Get all domains in a resource group.
 *
 * @param resourceGroupName Name of the resource group to which the resource belongs.
 * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
 * @throws IllegalArgumentException thrown if parameters fail the validation
 * @return the {@link ServiceFuture} object
 */
public ServiceFuture<List<DomainInner>> listByResourceGroupAsync(final String resourceGroupName, final ListOperationCallback<DomainInner> serviceCallback) {
    return AzureServiceFuture.fromPageResponse(
        listByResourceGroupSinglePageAsync(resourceGroupName),
        new Func1<String, Observable<ServiceResponse<Page<DomainInner>>>>() {
            @Override
            public Observable<ServiceResponse<Page<DomainInner>>> call(String nextPageLink) {
                return listByResourceGroupNextSinglePageAsync(nextPageLink);
            }
        },
        serviceCallback);
}
 
Example #16
Source File: LoadBalancerBackendAddressPoolsInner.java    From azure-libraries-for-java with MIT License 5 votes vote down vote up
/**
 * Gets all the load balancer backed address pools.
 *
 * @param resourceGroupName The name of the resource group.
 * @param loadBalancerName The name of the load balancer.
 * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
 * @throws IllegalArgumentException thrown if parameters fail the validation
 * @return the {@link ServiceFuture} object
 */
public ServiceFuture<List<BackendAddressPoolInner>> listAsync(final String resourceGroupName, final String loadBalancerName, final ListOperationCallback<BackendAddressPoolInner> serviceCallback) {
    return AzureServiceFuture.fromPageResponse(
        listSinglePageAsync(resourceGroupName, loadBalancerName),
        new Func1<String, Observable<ServiceResponse<Page<BackendAddressPoolInner>>>>() {
            @Override
            public Observable<ServiceResponse<Page<BackendAddressPoolInner>>> call(String nextPageLink) {
                return listNextSinglePageAsync(nextPageLink);
            }
        },
        serviceCallback);
}
 
Example #17
Source File: ImagesInner.java    From azure-libraries-for-java with MIT License 5 votes vote down vote up
/**
 * Gets the list of Images in the subscription. Use nextLink property in the response to get the next page of Images. Do this till nextLink is null to fetch all the Images.
 *
 * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
 * @throws IllegalArgumentException thrown if parameters fail the validation
 * @return the {@link ServiceFuture} object
 */
public ServiceFuture<List<ImageInner>> listAsync(final ListOperationCallback<ImageInner> serviceCallback) {
    return AzureServiceFuture.fromPageResponse(
        listSinglePageAsync(),
        new Func1<String, Observable<ServiceResponse<Page<ImageInner>>>>() {
            @Override
            public Observable<ServiceResponse<Page<ImageInner>>> call(String nextPageLink) {
                return listNextSinglePageAsync(nextPageLink);
            }
        },
        serviceCallback);
}
 
Example #18
Source File: FailoverGroupsInner.java    From azure-libraries-for-java with MIT License 5 votes vote down vote up
/**
 * Lists the failover groups in a server.
 *
 * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
 * @param serverName The name of the server containing the failover group.
 * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
 * @throws IllegalArgumentException thrown if parameters fail the validation
 * @return the {@link ServiceFuture} object
 */
public ServiceFuture<List<FailoverGroupInner>> listByServerAsync(final String resourceGroupName, final String serverName, final ListOperationCallback<FailoverGroupInner> serviceCallback) {
    return AzureServiceFuture.fromPageResponse(
        listByServerSinglePageAsync(resourceGroupName, serverName),
        new Func1<String, Observable<ServiceResponse<Page<FailoverGroupInner>>>>() {
            @Override
            public Observable<ServiceResponse<Page<FailoverGroupInner>>> call(String nextPageLink) {
                return listByServerNextSinglePageAsync(nextPageLink);
            }
        },
        serviceCallback);
}
 
Example #19
Source File: VirtualHubRouteTableV2sInner.java    From azure-libraries-for-java with MIT License 5 votes vote down vote up
/**
 * Retrieves the details of all VirtualHubRouteTableV2s.
 *
 * @param resourceGroupName The resource group name of the VirtualHub.
 * @param virtualHubName The name of the VirtualHub.
 * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
 * @throws IllegalArgumentException thrown if parameters fail the validation
 * @return the {@link ServiceFuture} object
 */
public ServiceFuture<List<VirtualHubRouteTableV2Inner>> listAsync(final String resourceGroupName, final String virtualHubName, final ListOperationCallback<VirtualHubRouteTableV2Inner> serviceCallback) {
    return AzureServiceFuture.fromPageResponse(
        listSinglePageAsync(resourceGroupName, virtualHubName),
        new Func1<String, Observable<ServiceResponse<Page<VirtualHubRouteTableV2Inner>>>>() {
            @Override
            public Observable<ServiceResponse<Page<VirtualHubRouteTableV2Inner>>> call(String nextPageLink) {
                return listNextSinglePageAsync(nextPageLink);
            }
        },
        serviceCallback);
}
 
Example #20
Source File: SensitivityLabelsInner.java    From azure-libraries-for-java with MIT License 5 votes vote down vote up
/**
 * Gets the sensitivity labels of a given database.
 *
 * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
 * @param serverName The name of the server.
 * @param databaseName The name of the database.
 * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
 * @throws IllegalArgumentException thrown if parameters fail the validation
 * @return the {@link ServiceFuture} object
 */
public ServiceFuture<List<SensitivityLabelInner>> listCurrentByDatabaseAsync(final String resourceGroupName, final String serverName, final String databaseName, final ListOperationCallback<SensitivityLabelInner> serviceCallback) {
    return AzureServiceFuture.fromPageResponse(
        listCurrentByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName),
        new Func1<String, Observable<ServiceResponse<Page<SensitivityLabelInner>>>>() {
            @Override
            public Observable<ServiceResponse<Page<SensitivityLabelInner>>> call(String nextPageLink) {
                return listCurrentByDatabaseNextSinglePageAsync(nextPageLink);
            }
        },
        serviceCallback);
}
 
Example #21
Source File: InstancePoolsInner.java    From azure-libraries-for-java with MIT License 5 votes vote down vote up
/**
 * Gets a list of all instance pools in the subscription.
 *
 * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
 * @throws IllegalArgumentException thrown if parameters fail the validation
 * @return the {@link ServiceFuture} object
 */
public ServiceFuture<List<InstancePoolInner>> listAsync(final ListOperationCallback<InstancePoolInner> serviceCallback) {
    return AzureServiceFuture.fromPageResponse(
        listSinglePageAsync(),
        new Func1<String, Observable<ServiceResponse<Page<InstancePoolInner>>>>() {
            @Override
            public Observable<ServiceResponse<Page<InstancePoolInner>>> call(String nextPageLink) {
                return listNextSinglePageAsync(nextPageLink);
            }
        },
        serviceCallback);
}
 
Example #22
Source File: AgentPoolsInner.java    From azure-libraries-for-java with MIT License 5 votes vote down vote up
/**
 * Gets a list of agent pools in the specified managed cluster.
 * Gets a list of agent pools in the specified managed cluster. The operation returns properties of each agent pool.
 *
 * @param resourceGroupName The name of the resource group.
 * @param resourceName The name of the managed cluster resource.
 * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
 * @throws IllegalArgumentException thrown if parameters fail the validation
 * @return the {@link ServiceFuture} object
 */
public ServiceFuture<List<AgentPoolInner>> listAsync(final String resourceGroupName, final String resourceName, final ListOperationCallback<AgentPoolInner> serviceCallback) {
    return AzureServiceFuture.fromPageResponse(
        listSinglePageAsync(resourceGroupName, resourceName),
        new Func1<String, Observable<ServiceResponse<Page<AgentPoolInner>>>>() {
            @Override
            public Observable<ServiceResponse<Page<AgentPoolInner>>> call(String nextPageLink) {
                return listNextSinglePageAsync(nextPageLink);
            }
        },
        serviceCallback);
}
 
Example #23
Source File: VirtualMachineRunCommandsInner.java    From azure-libraries-for-java with MIT License 5 votes vote down vote up
/**
 * Lists all available run commands for a subscription in a location.
 *
 * @param location The location upon which run commands is queried.
 * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
 * @throws IllegalArgumentException thrown if parameters fail the validation
 * @return the {@link ServiceFuture} object
 */
public ServiceFuture<List<RunCommandDocumentBaseInner>> listAsync(final String location, final ListOperationCallback<RunCommandDocumentBaseInner> serviceCallback) {
    return AzureServiceFuture.fromPageResponse(
        listSinglePageAsync(location),
        new Func1<String, Observable<ServiceResponse<Page<RunCommandDocumentBaseInner>>>>() {
            @Override
            public Observable<ServiceResponse<Page<RunCommandDocumentBaseInner>>> call(String nextPageLink) {
                return listNextSinglePageAsync(nextPageLink);
            }
        },
        serviceCallback);
}
 
Example #24
Source File: VpnSiteLinksInner.java    From azure-libraries-for-java with MIT License 5 votes vote down vote up
/**
 * Lists all the vpnSiteLinks in a resource group for a vpn site.
 *
 * @param resourceGroupName The resource group name of the VpnSite.
 * @param vpnSiteName The name of the VpnSite.
 * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
 * @throws IllegalArgumentException thrown if parameters fail the validation
 * @return the {@link ServiceFuture} object
 */
public ServiceFuture<List<VpnSiteLinkInner>> listByVpnSiteAsync(final String resourceGroupName, final String vpnSiteName, final ListOperationCallback<VpnSiteLinkInner> serviceCallback) {
    return AzureServiceFuture.fromPageResponse(
        listByVpnSiteSinglePageAsync(resourceGroupName, vpnSiteName),
        new Func1<String, Observable<ServiceResponse<Page<VpnSiteLinkInner>>>>() {
            @Override
            public Observable<ServiceResponse<Page<VpnSiteLinkInner>>> call(String nextPageLink) {
                return listByVpnSiteNextSinglePageAsync(nextPageLink);
            }
        },
        serviceCallback);
}
 
Example #25
Source File: WebhookImpl.java    From azure-libraries-for-java with MIT License 4 votes vote down vote up
@Override
public ServiceFuture<Webhook> applyAsync(ServiceCallback<Webhook> callback) {
    return ServiceFuture.fromBody(this.updateResourceAsync(), callback);
}
 
Example #26
Source File: CdnProfilesImpl.java    From azure-libraries-for-java with MIT License 4 votes vote down vote up
@Override
public ServiceFuture<CheckNameAvailabilityResult> checkEndpointNameAvailabilityAsync(String name, ServiceCallback<CheckNameAvailabilityResult> callback) {
    return ServiceFuture.fromBody(this.checkEndpointNameAvailabilityAsync(name), callback);
}
 
Example #27
Source File: ExternalChildResourceImpl.java    From azure-libraries-for-java with MIT License 4 votes vote down vote up
@Override
public ServiceFuture<FluentModelT> applyAsync(ServiceCallback<FluentModelT> callback) {
    return ServiceFuture.fromBody(applyAsync(), callback);
}
 
Example #28
Source File: DeploymentImpl.java    From azure-libraries-for-java with MIT License 4 votes vote down vote up
@Override
public ServiceFuture<WhatIfOperationResult> whatIfAsync(ServiceCallback<WhatIfOperationResult> callback) {
    return ServiceFuture.fromBody(this.whatIfAsync(), callback);
}
 
Example #29
Source File: CdnProfile.java    From azure-libraries-for-java with MIT License 2 votes vote down vote up
/**
 * Checks the availability of an endpoint name without creating the CDN endpoint asynchronously.
 *
 * @param name the endpoint resource name to validate.
 * @param callback the callback to call on success or failure
 * @return a representation of the deferred computation of this call
 */
ServiceFuture<CheckNameAvailabilityResult> checkEndpointNameAvailabilityAsync(String name, ServiceCallback<CheckNameAvailabilityResult> callback);
 
Example #30
Source File: GeographicHierarchiesInner.java    From azure-libraries-for-java with MIT License 2 votes vote down vote up
/**
 * Gets the default Geographic Hierarchy used by the Geographic traffic routing method.
 *
 * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
 * @throws IllegalArgumentException thrown if parameters fail the validation
 * @return the {@link ServiceFuture} object
 */
public ServiceFuture<TrafficManagerGeographicHierarchyInner> getDefaultAsync(final ServiceCallback<TrafficManagerGeographicHierarchyInner> serviceCallback) {
    return ServiceFuture.fromResponse(getDefaultWithServiceResponseAsync(), serviceCallback);
}