public final class BaseRequest extends Object
Modifier and Type | Method and Description |
---|---|
static void |
addMetadata(HttpURLConnection request,
Map<String,String> metadata,
OperationContext opContext)
Adds the metadata.
|
static void |
addOptionalHeader(HttpURLConnection request,
String name,
String value)
Adds the optional header.
|
static HttpURLConnection |
create(URI uri,
RequestOptions options,
UriQueryBuilder builder,
OperationContext opContext)
Creates the specified resource.
|
static HttpURLConnection |
createURLConnection(URI uri,
RequestOptions options,
UriQueryBuilder builder,
OperationContext opContext)
Creates the web request.
|
static HttpURLConnection |
delete(URI uri,
RequestOptions options,
UriQueryBuilder builder,
OperationContext opContext)
Deletes the specified resource.
|
static UriQueryBuilder |
getListUriQueryBuilder(ListingContext listingContext)
Gets a
UriQueryBuilder for listing. |
static HttpURLConnection |
getProperties(URI uri,
RequestOptions options,
UriQueryBuilder builder,
OperationContext opContext)
Gets the properties.
|
static HttpURLConnection |
getServiceProperties(URI uri,
RequestOptions options,
UriQueryBuilder builder,
OperationContext opContext)
Creates a HttpURLConnection used to retrieve the Analytics service properties from the storage service.
|
static HttpURLConnection |
getServiceStats(URI uri,
RequestOptions options,
UriQueryBuilder builder,
OperationContext opContext)
Creates a web request to get the stats of the service.
|
static String |
getUserAgent()
Gets the user agent to send over the wire to identify the client.
|
static HttpURLConnection |
setMetadata(URI uri,
RequestOptions options,
UriQueryBuilder builder,
OperationContext opContext)
Sets the metadata.
|
static HttpURLConnection |
setServiceProperties(URI uri,
RequestOptions options,
UriQueryBuilder builder,
OperationContext opContext)
Creates a HttpURLConnection used to set the Analytics service properties on the storage service.
|
public static void addMetadata(HttpURLConnection request, Map<String,String> metadata, OperationContext opContext)
request
- The request.metadata
- The metadata.public static void addOptionalHeader(HttpURLConnection request, String name, String value)
request
- a HttpURLConnection for the operation.name
- the metadata name.value
- the metadata value.public static HttpURLConnection create(URI uri, RequestOptions options, UriQueryBuilder builder, OperationContext opContext) throws IOException, URISyntaxException, StorageException
uri
- the request Uri.options
- A RequestOptions
object that specifies execution options such as retry policy and timeout
settings for the operation.builder
- the UriQueryBuilder for the requestopContext
- an object used to track the execution of the operationIOException
- if there is an error opening the connectionURISyntaxException
- if there is an improperly formated URIStorageException
IllegalArgumentException
public static HttpURLConnection createURLConnection(URI uri, RequestOptions options, UriQueryBuilder builder, OperationContext opContext) throws IOException, URISyntaxException, StorageException
uri
- the request Uri.options
- A RequestOptions
object that specifies execution options such as retry policy and timeout
settings for the operation. This parameter is unused.builder
- the UriQueryBuilder for the requestopContext
- an object used to track the execution of the operationIOException
- if there is an error opening the connectionURISyntaxException
- if there is an improperly formated URIStorageException
public static HttpURLConnection delete(URI uri, RequestOptions options, UriQueryBuilder builder, OperationContext opContext) throws IOException, URISyntaxException, StorageException
uri
- the request Uri.timeout
- the timeout for the requestbuilder
- the UriQueryBuilder for the requestopContext
- an object used to track the execution of the operationIOException
- if there is an error opening the connectionURISyntaxException
- if there is an improperly formated URIStorageException
public static UriQueryBuilder getListUriQueryBuilder(ListingContext listingContext) throws StorageException
UriQueryBuilder
for listing.listingContext
- A ListingContext
object that specifies parameters for
the listing operation, if any. May be null
.StorageException
- If a storage service error occurred during the operation.public static HttpURLConnection getProperties(URI uri, RequestOptions options, UriQueryBuilder builder, OperationContext opContext) throws IOException, URISyntaxException, StorageException
uri
- The Uri to query.timeout
- The timeout.builder
- The builder.opContext
- an object used to track the execution of the operationStorageException
URISyntaxException
IOException
public static HttpURLConnection getServiceProperties(URI uri, RequestOptions options, UriQueryBuilder builder, OperationContext opContext) throws IOException, URISyntaxException, StorageException
uri
- The service endpoint.timeout
- The timeout.builder
- The builder.opContext
- an object used to track the execution of the operationIOException
URISyntaxException
StorageException
public static HttpURLConnection getServiceStats(URI uri, RequestOptions options, UriQueryBuilder builder, OperationContext opContext) throws IOException, URISyntaxException, StorageException
uri
- The service endpoint.timeout
- The timeout.builder
- The builder.opContext
- an object used to track the execution of the operationIOException
URISyntaxException
StorageException
public static String getUserAgent()
public static HttpURLConnection setMetadata(URI uri, RequestOptions options, UriQueryBuilder builder, OperationContext opContext) throws IOException, URISyntaxException, StorageException
uri
- The blob Uri.timeout
- The timeout.builder
- The builder.opContext
- an object used to track the execution of the operationStorageException
URISyntaxException
IOException
public static HttpURLConnection setServiceProperties(URI uri, RequestOptions options, UriQueryBuilder builder, OperationContext opContext) throws IOException, URISyntaxException, StorageException
uri
- The service endpoint.timeout
- The timeout.builder
- The builder.opContext
- an object used to track the execution of the operationIOException
URISyntaxException
StorageException
Copyright © 2019. All rights reserved.