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


Java BaseRequest.create方法代码示例

本文整理汇总了Java中com.microsoft.azure.storage.core.BaseRequest.create方法的典型用法代码示例。如果您正苦于以下问题:Java BaseRequest.create方法的具体用法?Java BaseRequest.create怎么用?Java BaseRequest.create使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.microsoft.azure.storage.core.BaseRequest的用法示例。


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

示例1: createContainer

import com.microsoft.azure.storage.core.BaseRequest; //导入方法依赖的package包/类
/**
 * Constructs a web request to create a new container. Sign with 0 length.
 * 
 * @param uri
 *            A <code>java.net.URI</code> object that specifies the absolute URI.
 * @param blobOptions
 *            A {@link BlobRequestOptions} object that specifies execution options such as retry policy and timeout
 *            settings for the operation. Specify <code>null</code> to use the request options specified on the
 *            {@link CloudBlobClient}.
 * @param opContext
 *            An {@link OperationContext} object that represents the context for the current operation. This object
 *            is used to track requests to the storage service, and to provide additional runtime information about
 *            the operation.
 * @param publicAccess
 *            The type of public access to allow for the container.
 * @return a HttpURLConnection configured for the operation.
 * @throws StorageException
 * @throws IllegalArgumentException
 */
public static HttpURLConnection createContainer(final URI uri, final BlobRequestOptions blobOptions,
        final OperationContext opContext, final BlobContainerPublicAccessType publicAccess) throws IOException, URISyntaxException, StorageException {
    if (publicAccess == BlobContainerPublicAccessType.UNKNOWN) {
        throw new IllegalArgumentException(String.format(Utility.LOCALE_US, SR.ARGUMENT_OUT_OF_RANGE_ERROR, "accessType", publicAccess));
    }
    
    final UriQueryBuilder containerBuilder = getContainerUriQueryBuilder();
    final HttpURLConnection request = BaseRequest.create(uri, blobOptions, containerBuilder, opContext);

    if (publicAccess != null && publicAccess != BlobContainerPublicAccessType.OFF) {
        request.setRequestProperty(BlobConstants.BLOB_PUBLIC_ACCESS_HEADER, publicAccess.toString().toLowerCase());
    }

    return request;
}
 
开发者ID:Azure,项目名称:azure-storage-android,代码行数:35,代码来源:BlobRequest.java

示例2: createShare

import com.microsoft.azure.storage.core.BaseRequest; //导入方法依赖的package包/类
/**
 * Constructs a web request to create a new share. Sign with 0 length.
 * 
 * @param uri
 *            A <code>java.net.URI</code> object that specifies the absolute URI.
 * @param fileOptions
 *            A {@link FileRequestOptions} object that specifies execution options such as retry policy and timeout
 *            settings for the operation. Specify <code>null</code> to use the request options specified on the
 *            {@link CloudFileClient}.
 * @param opContext
 *            An {@link OperationContext} object that represents the context for the current operation. This object
 *            is used to track requests to the storage service, and to provide additional runtime information about
 *            the operation.
 * @param properties
 *            The properties to set for the share.
 * @return a HttpURLConnection configured for the operation.
 * @throws StorageException
 * @throws IllegalArgumentException
 */
public static HttpURLConnection createShare(final URI uri, final FileRequestOptions fileOptions,
        final OperationContext opContext, final FileShareProperties properties)
        throws IOException, URISyntaxException, StorageException {
    final UriQueryBuilder shareBuilder = getShareUriQueryBuilder();
    final HttpURLConnection request = BaseRequest.create(uri, fileOptions, shareBuilder, opContext);
    addProperties(request, properties);
    return request;
}
 
开发者ID:Azure,项目名称:azure-storage-android,代码行数:28,代码来源:FileRequest.java

示例3: createContainer

import com.microsoft.azure.storage.core.BaseRequest; //导入方法依赖的package包/类
/**
 * Constructs a web request to create a new container. Sign with 0 length.
 * 
 * @param uri
 *            A <code>java.net.URI</code> object that specifies the absolute URI.
 * @param blobOptions
 *            A {@link BlobRequestOptions} object that specifies execution options such as retry policy and timeout
 *            settings for the operation. Specify <code>null</code> to use the request options specified on the
 *            {@link CloudBlobClient}.
 * @param opContext
 *            An {@link OperationContext} object that represents the context for the current operation. This object
 *            is used to track requests to the storage service, and to provide additional runtime information about
 *            the operation.
 * @return a HttpURLConnection configured for the operation.
 * @throws StorageException
 * @throws IllegalArgumentException
 */
public static HttpURLConnection createContainer(final URI uri, final BlobRequestOptions blobOptions,
        final OperationContext opContext) throws IOException, URISyntaxException, StorageException {
    final UriQueryBuilder containerBuilder = getContainerUriQueryBuilder();
    return BaseRequest.create(uri, blobOptions, containerBuilder, opContext);
}
 
开发者ID:horizon-institute,项目名称:runspotrun-android-client,代码行数:23,代码来源:BlobRequest.java

示例4: createShare

import com.microsoft.azure.storage.core.BaseRequest; //导入方法依赖的package包/类
/**
 * Constructs a web request to create a new share. Sign with 0 length.
 * 
 * @param uri
 *            A <code>java.net.URI</code> object that specifies the absolute URI.
 * @param fileOptions
 *            A {@link FileRequestOptions} object that specifies execution options such as retry policy and timeout
 *            settings for the operation. Specify <code>null</code> to use the request options specified on the
 *            {@link CloudFileClient}.
 * @param opContext
 *            An {@link OperationContext} object that represents the context for the current operation. This object
 *            is used to track requests to the storage service, and to provide additional runtime information about
 *            the operation.
 * @return a HttpURLConnection configured for the operation.
 * @throws StorageException
 * @throws IllegalArgumentException
 */
public static HttpURLConnection createShare(final URI uri, final FileRequestOptions fileOptions,
        final OperationContext opContext) throws IOException, URISyntaxException, StorageException {
    final UriQueryBuilder shareBuilder = getShareUriQueryBuilder();
    return BaseRequest.create(uri, fileOptions, shareBuilder, opContext);
}
 
开发者ID:horizon-institute,项目名称:runspotrun-android-client,代码行数:23,代码来源:FileRequest.java

示例5: createDirectory

import com.microsoft.azure.storage.core.BaseRequest; //导入方法依赖的package包/类
/**
 * Constructs a web request to create a new directory. Sign with 0 length.
 * 
 * @param uri
 *            A <code>java.net.URI</code> object that specifies the absolute URI.
 * @param fileOptions
 *            A {@link FileRequestOptions} object that specifies execution options such as retry policy and timeout
 *            settings for the operation. Specify <code>null</code> to use the request options specified on the
 *            {@link CloudFileClient}.
 * @param opContext
 *            An {@link OperationContext} object that represents the context for the current operation. This object
 *            is used to track requests to the storage service, and to provide additional runtime information about
 *            the operation.
 * @return a HttpURLConnection configured for the operation.
 * @throws StorageException
 * @throws IllegalArgumentException
 */
public static HttpURLConnection createDirectory(final URI uri, final FileRequestOptions fileOptions,
        final OperationContext opContext) throws IOException, URISyntaxException, StorageException {
    final UriQueryBuilder directoryBuilder = getDirectoryUriQueryBuilder();
    return BaseRequest.create(uri, fileOptions, directoryBuilder, opContext);
}
 
开发者ID:horizon-institute,项目名称:runspotrun-android-client,代码行数:23,代码来源:FileRequest.java

示例6: create

import com.microsoft.azure.storage.core.BaseRequest; //导入方法依赖的package包/类
/**
 * Constructs a web request to create a new queue. Sign the web request with
 * a length of 0.
 * 
 * @param uri
 *            A <code>URI</code> object that specifies the absolute URI to
 *            the queue.
 * @param queueOptions
 *            A {@link QueueRequestOptions} object that specifies execution options such as retry policy and timeout
 *            settings for the operation. Specify <code>null</code> to use the request options specified on the
 *            {@link CloudQueueClient}.
 * @param opContext
 *            An {@link OperationContext} object that represents the context
 *            for the current operation. This object is used to track
 *            requests to the storage service, and to provide additional
 *            runtime information about the operation.
 * 
 * @return An <code>HttpURLConnection</code> configured for the specified
 *         operation.
 * 
 * @throws IOException
 * @throws URISyntaxException
 *             If the URI is not valid.
 * @throws StorageException
 *             If a storage service error occurred during the operation.
 */
public static HttpURLConnection create(final URI uri, final QueueRequestOptions queueOptions,
        final OperationContext opContext) throws IOException, URISyntaxException, StorageException {
    return BaseRequest.create(uri, queueOptions, null, opContext);
}
 
开发者ID:horizon-institute,项目名称:runspotrun-android-client,代码行数:31,代码来源:QueueRequest.java


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