Table of Contents

Class QueueHttpWebRequestFactory

Namespace
Microsoft.WindowsAzure.Storage.Queue.Protocol
Assembly
Microsoft.WindowsAzure.Storage.dll

A factory class for constructing a web request to manage queues in the Queue service.

public static class QueueHttpWebRequestFactory
Inheritance
QueueHttpWebRequestFactory
Inherited Members

Methods

AddMessage(Uri, int?, int?, int?, OperationContext)

Constructs a web request to add a message for a queue.

public static HttpWebRequest AddMessage(Uri uri, int? timeout, int? timeToLiveInSeconds, int? visibilityTimeoutInSeconds, OperationContext operationContext)

Parameters

uri Uri

A System.Uri specifying the absolute URI to the queue.

timeout int?

An integer specifying the server timeout interval.

timeToLiveInSeconds int?

The message time-to-live, in seconds.

visibilityTimeoutInSeconds int?

The length of time during which the message will be invisible, in seconds.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

Returns

HttpWebRequest

A HttpWebRequest object.

AddMessage(Uri, int?, int?, int?, bool, OperationContext)

Constructs a web request to add a message for a queue.

public static HttpWebRequest AddMessage(Uri uri, int? timeout, int? timeToLiveInSeconds, int? visibilityTimeoutInSeconds, bool useVersionHeader, OperationContext operationContext)

Parameters

uri Uri

A System.Uri specifying the absolute URI to the queue.

timeout int?

An integer specifying the server timeout interval.

timeToLiveInSeconds int?

The message time-to-live, in seconds.

visibilityTimeoutInSeconds int?

The length of time during which the message will be invisible, in seconds.

useVersionHeader bool

A boolean value indicating whether to set the x-ms-version HTTP header.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

Returns

HttpWebRequest

A HttpWebRequest object.

AddMessage(Uri, int?, long?, int?, bool, OperationContext)

Constructs a web request to add a message for a queue.

public static HttpWebRequest AddMessage(Uri uri, int? timeout, long? timeToLiveInSeconds, int? visibilityTimeoutInSeconds, bool useVersionHeader, OperationContext operationContext)

Parameters

uri Uri

A System.Uri specifying the absolute URI to the queue.

timeout int?

An integer specifying the server timeout interval.

timeToLiveInSeconds long?

The message time-to-live, in seconds.

visibilityTimeoutInSeconds int?

The length of time during which the message will be invisible, in seconds.

useVersionHeader bool

A boolean value indicating whether to set the x-ms-version HTTP header.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

Returns

HttpWebRequest

A HttpWebRequest object.

AddMetadata(HttpWebRequest, IDictionary<string, string>)

Adds user-defined metadata to the request as one or more name-value pairs.

public static void AddMetadata(HttpWebRequest request, IDictionary<string, string> metadata)

Parameters

request HttpWebRequest

A HttpWebRequest object.

metadata IDictionary<string, string>

A Dictionary<TKey, TValue> object containing the user-defined metadata.

AddMetadata(HttpWebRequest, string, string)

Adds user-defined metadata to the request as a single name-value pair.

public static void AddMetadata(HttpWebRequest request, string name, string value)

Parameters

request HttpWebRequest

A HttpWebRequest object.

name string

A string containing the metadata name.

value string

A string containing the metadata value.

ClearMessages(Uri, int?, OperationContext)

Constructs a web request to clear all messages in the queue.

public static HttpWebRequest ClearMessages(Uri uri, int? timeout, OperationContext operationContext)

Parameters

uri Uri

A System.Uri specifying the absolute URI to the queue.

timeout int?

An integer specifying the server timeout interval.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

Returns

HttpWebRequest

A HttpWebRequest object.

ClearMessages(Uri, int?, bool, OperationContext)

Constructs a web request to clear all messages in the queue.

public static HttpWebRequest ClearMessages(Uri uri, int? timeout, bool useVersionHeader, OperationContext operationContext)

Parameters

uri Uri

A System.Uri specifying the absolute URI to the queue.

timeout int?

An integer specifying the server timeout interval.

useVersionHeader bool

A boolean value indicating whether to set the x-ms-version HTTP header.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

Returns

HttpWebRequest

A HttpWebRequest object.

Create(Uri, int?, OperationContext)

Constructs a web request to create a new queue.

public static HttpWebRequest Create(Uri uri, int? timeout, OperationContext operationContext)

Parameters

uri Uri

A System.Uri specifying the absolute URI to the queue.

timeout int?

An integer specifying the server timeout interval.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

Returns

HttpWebRequest

A HttpWebRequest object.

Create(Uri, int?, bool, OperationContext)

Constructs a web request to create a new queue.

public static HttpWebRequest Create(Uri uri, int? timeout, bool useVersionHeader, OperationContext operationContext)

Parameters

uri Uri

A System.Uri specifying the absolute URI to the queue.

timeout int?

An integer specifying the server timeout interval.

useVersionHeader bool

A boolean value indicating whether to set the x-ms-version HTTP header.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

Returns

HttpWebRequest

A HttpWebRequest object.

Delete(Uri, int?, OperationContext)

Constructs a web request to delete the queue and all of the messages within it.

public static HttpWebRequest Delete(Uri uri, int? timeout, OperationContext operationContext)

Parameters

uri Uri

A System.Uri specifying the absolute URI to the queue.

timeout int?

An integer specifying the server timeout interval.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

Returns

HttpWebRequest

A HttpWebRequest object.

Delete(Uri, int?, bool, OperationContext)

Constructs a web request to delete the queue and all of the messages within it.

public static HttpWebRequest Delete(Uri uri, int? timeout, bool useVersionHeader, OperationContext operationContext)

Parameters

uri Uri

A System.Uri specifying the absolute URI to the queue.

timeout int?

An integer specifying the server timeout interval.

useVersionHeader bool

A boolean value indicating whether to set the x-ms-version HTTP header.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

Returns

HttpWebRequest

A HttpWebRequest object.

DeleteMessage(Uri, int?, string, OperationContext)

Constructs a web request to update a message.

public static HttpWebRequest DeleteMessage(Uri uri, int? timeout, string popReceipt, OperationContext operationContext)

Parameters

uri Uri

A System.Uri specifying the absolute URI to the message to update.

timeout int?

The server timeout interval, in seconds.

popReceipt string

A string specifying the pop receipt of the message.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

Returns

HttpWebRequest

A HttpWebRequest object.

DeleteMessage(Uri, int?, string, bool, OperationContext)

Constructs a web request to update a message.

public static HttpWebRequest DeleteMessage(Uri uri, int? timeout, string popReceipt, bool useVersionHeader, OperationContext operationContext)

Parameters

uri Uri

A System.Uri specifying the absolute URI to the message to update.

timeout int?

The server timeout interval, in seconds.

popReceipt string

A string specifying the pop receipt of the message.

useVersionHeader bool

A boolean value indicating whether to set the x-ms-version HTTP header.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

Returns

HttpWebRequest

A HttpWebRequest object.

GetAcl(Uri, int?, OperationContext)

Constructs a web request to return the ACL for a queue.

public static HttpWebRequest GetAcl(Uri uri, int? timeout, OperationContext operationContext)

Parameters

uri Uri

A System.Uri specifying the absolute URI to the queue.

timeout int?

An integer specifying the server timeout interval.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

Returns

HttpWebRequest

A HttpWebRequest object.

GetAcl(Uri, int?, bool, OperationContext)

Constructs a web request to return the ACL for a queue.

public static HttpWebRequest GetAcl(Uri uri, int? timeout, bool useVersionHeader, OperationContext operationContext)

Parameters

uri Uri

A System.Uri specifying the absolute URI to the queue.

timeout int?

An integer specifying the server timeout interval.

useVersionHeader bool

A boolean value indicating whether to set the x-ms-version HTTP header.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

Returns

HttpWebRequest

A HttpWebRequest object.

GetMessages(Uri, int?, int, TimeSpan?, OperationContext)

Constructs a web request to get messages from a queue.

public static HttpWebRequest GetMessages(Uri uri, int? timeout, int numberOfMessages, TimeSpan? visibilityTimeout, OperationContext operationContext)

Parameters

uri Uri

A System.Uri specifying the absolute URI to the queue.

timeout int?

An integer specifying the server timeout interval.

numberOfMessages int

An integer specifying the number of messages to get. The maximum number of messages that may be retrieved at one time is 32.

visibilityTimeout TimeSpan?

A TimeSpan value specifying the visibility timeout.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

Returns

HttpWebRequest

A HttpWebRequest object.

GetMessages(Uri, int?, int, TimeSpan?, bool, OperationContext)

Constructs a web request to get messages from a queue.

public static HttpWebRequest GetMessages(Uri uri, int? timeout, int numberOfMessages, TimeSpan? visibilityTimeout, bool useVersionHeader, OperationContext operationContext)

Parameters

uri Uri

A System.Uri specifying the absolute URI to the queue.

timeout int?

An integer specifying the server timeout interval.

numberOfMessages int

An integer specifying the number of messages to get. The maximum number of messages that may be retrieved at one time is 32.

visibilityTimeout TimeSpan?

A TimeSpan value specifying the visibility timeout.

useVersionHeader bool

A boolean value indicating whether to set the x-ms-version HTTP header.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

Returns

HttpWebRequest

A HttpWebRequest object.

GetMetadata(Uri, int?, OperationContext)

Generates a web request to return the user-defined metadata for this queue.

public static HttpWebRequest GetMetadata(Uri uri, int? timeout, OperationContext operationContext)

Parameters

uri Uri

A System.Uri specifying the absolute URI to the queue.

timeout int?

An integer specifying the server timeout interval.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

Returns

HttpWebRequest

A HttpWebRequest object.

GetMetadata(Uri, int?, bool, OperationContext)

Generates a web request to return the user-defined metadata for this queue.

public static HttpWebRequest GetMetadata(Uri uri, int? timeout, bool useVersionHeader, OperationContext operationContext)

Parameters

uri Uri

A System.Uri specifying the absolute URI to the queue.

timeout int?

An integer specifying the server timeout interval.

useVersionHeader bool

A boolean value indicating whether to set the x-ms-version HTTP header.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

Returns

HttpWebRequest

A HttpWebRequest object.

GetServiceProperties(Uri, UriQueryBuilder, int?, OperationContext)

Creates a web request to get the properties of the Queue service.

public static HttpWebRequest GetServiceProperties(Uri uri, UriQueryBuilder builder, int? timeout, OperationContext operationContext)

Parameters

uri Uri

A System.Uri specifying the Queue service endpoint.

builder UriQueryBuilder

A UriQueryBuilder object specifying additional parameters to add to the URI query string.

timeout int?

The server timeout interval, in seconds.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

Returns

HttpWebRequest

A HttpWebRequest object.

GetServiceStats(Uri, UriQueryBuilder, int?, OperationContext)

Creates a web request to get Queue service stats.

public static HttpWebRequest GetServiceStats(Uri uri, UriQueryBuilder builder, int? timeout, OperationContext operationContext)

Parameters

uri Uri

A System.Uri specifying the Queue service endpoint.

builder UriQueryBuilder

A UriQueryBuilder object specifying additional parameters to add to the URI query string.

timeout int?

The server timeout interval, in seconds.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

Returns

HttpWebRequest

A HttpWebRequest object.

List(Uri, int?, ListingContext, QueueListingDetails, OperationContext)

Constructs a web request to return a listing of all queues in this storage account.

public static HttpWebRequest List(Uri uri, int? timeout, ListingContext listingContext, QueueListingDetails detailsIncluded, OperationContext operationContext)

Parameters

uri Uri

A System.Uri specifying the Queue service endpoint.

timeout int?

An integer specifying the server timeout interval.

listingContext ListingContext

A ListingContext object.

detailsIncluded QueueListingDetails

A QueueListingDetails enumeration value that indicates whether to return queue metadata with the listing.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

Returns

HttpWebRequest

A HttpWebRequest object.

List(Uri, int?, ListingContext, QueueListingDetails, bool, OperationContext)

Constructs a web request to return a listing of all queues in this storage account.

public static HttpWebRequest List(Uri uri, int? timeout, ListingContext listingContext, QueueListingDetails detailsIncluded, bool useVersionHeader, OperationContext operationContext)

Parameters

uri Uri

A System.Uri specifying the Queue service endpoint.

timeout int?

An integer specifying the server timeout interval.

listingContext ListingContext

A ListingContext object.

detailsIncluded QueueListingDetails

A QueueListingDetails enumeration value that indicates whether to return queue metadata with the listing.

useVersionHeader bool

A boolean value indicating whether to set the x-ms-version HTTP header.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

Returns

HttpWebRequest

A HttpWebRequest object.

PeekMessages(Uri, int?, int, OperationContext)

Constructs a web request to peek messages from a queue.

public static HttpWebRequest PeekMessages(Uri uri, int? timeout, int numberOfMessages, OperationContext operationContext)

Parameters

uri Uri

A System.Uri specifying the absolute URI to the queue.

timeout int?

An integer specifying the server timeout interval.

numberOfMessages int

An integer specifying the number of messages to peek. The maximum number of messages that may be retrieved at one time is 32.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

Returns

HttpWebRequest

A HttpWebRequest object.

PeekMessages(Uri, int?, int, bool, OperationContext)

Constructs a web request to peek messages from a queue.

public static HttpWebRequest PeekMessages(Uri uri, int? timeout, int numberOfMessages, bool useVersionHeader, OperationContext operationContext)

Parameters

uri Uri

A System.Uri specifying the absolute URI to the queue.

timeout int?

An integer specifying the server timeout interval.

numberOfMessages int

An integer specifying the number of messages to peek. The maximum number of messages that may be retrieved at one time is 32.

useVersionHeader bool

A boolean value indicating whether to set the x-ms-version HTTP header.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

Returns

HttpWebRequest

A HttpWebRequest object.

SetAcl(Uri, int?, OperationContext)

Constructs a web request to set the ACL for a queue.

public static HttpWebRequest SetAcl(Uri uri, int? timeout, OperationContext operationContext)

Parameters

uri Uri

A System.Uri specifying the absolute URI to the queue.

timeout int?

An integer specifying the server timeout interval.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

Returns

HttpWebRequest

A HttpWebRequest object.

SetAcl(Uri, int?, bool, OperationContext)

Constructs a web request to set the ACL for a queue.

public static HttpWebRequest SetAcl(Uri uri, int? timeout, bool useVersionHeader, OperationContext operationContext)

Parameters

uri Uri

A System.Uri specifying the absolute URI to the queue.

timeout int?

An integer specifying the server timeout interval.

useVersionHeader bool

A boolean value indicating whether to set the x-ms-version HTTP header.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

Returns

HttpWebRequest

A HttpWebRequest object.

SetMetadata(Uri, int?, OperationContext)

Generates a web request to set user-defined metadata for the queue.

public static HttpWebRequest SetMetadata(Uri uri, int? timeout, OperationContext operationContext)

Parameters

uri Uri

A System.Uri specifying the absolute URI to the queue.

timeout int?

An integer specifying the server timeout interval.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

Returns

HttpWebRequest

A HttpWebRequest object.

SetMetadata(Uri, int?, bool, OperationContext)

Generates a web request to set user-defined metadata for the queue.

public static HttpWebRequest SetMetadata(Uri uri, int? timeout, bool useVersionHeader, OperationContext operationContext)

Parameters

uri Uri

A System.Uri specifying the absolute URI to the queue.

timeout int?

An integer specifying the server timeout interval.

useVersionHeader bool

A boolean value indicating whether to set the x-ms-version HTTP header.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

Returns

HttpWebRequest

A HttpWebRequest object.

SetServiceProperties(Uri, UriQueryBuilder, int?, OperationContext)

Creates a web request to set the properties of the Queue service.

public static HttpWebRequest SetServiceProperties(Uri uri, UriQueryBuilder builder, int? timeout, OperationContext operationContext)

Parameters

uri Uri

A System.Uri specifying the Queue service endpoint.

builder UriQueryBuilder

A UriQueryBuilder object specifying additional parameters to add to the URI query string.

timeout int?

The server timeout interval, in seconds.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

Returns

HttpWebRequest

A HttpWebRequest object.

UpdateMessage(Uri, int?, string, int, OperationContext)

Constructs a web request to update a message.

public static HttpWebRequest UpdateMessage(Uri uri, int? timeout, string popReceipt, int visibilityTimeoutInSeconds, OperationContext operationContext)

Parameters

uri Uri

A System.Uri specifying the absolute URI to the message to update.

timeout int?

The server timeout interval, in seconds.

popReceipt string

A string specifying the pop receipt of the message.

visibilityTimeoutInSeconds int

The length of time during which the message will be invisible, in seconds.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

Returns

HttpWebRequest

A HttpWebRequest object.

UpdateMessage(Uri, int?, string, int, bool, OperationContext)

Constructs a web request to update a message.

public static HttpWebRequest UpdateMessage(Uri uri, int? timeout, string popReceipt, int visibilityTimeoutInSeconds, bool useVersionHeader, OperationContext operationContext)

Parameters

uri Uri

A System.Uri specifying the absolute URI to the message to update.

timeout int?

The server timeout interval, in seconds.

popReceipt string

A string specifying the pop receipt of the message.

visibilityTimeoutInSeconds int

The length of time during which the message will be invisible, in seconds.

useVersionHeader bool

A boolean value indicating whether to set the x-ms-version HTTP header.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

Returns

HttpWebRequest

A HttpWebRequest object.

WriteServiceProperties(ServiceProperties, Stream)

Writes Queue service properties to a stream, formatted in XML.

public static void WriteServiceProperties(ServiceProperties properties, Stream outputStream)

Parameters

properties ServiceProperties

A ServiceProperties object.

outputStream Stream

The Stream object to which the formatted properties are to be written.

addMessage(Uri, int?, long?, int?, OperationContext)

Constructs a web request to add a message for a queue.

public static HttpWebRequest addMessage(Uri uri, int? timeout, long? timeToLiveInSeconds, int? visibilityTimeoutInSeconds, OperationContext operationContext)

Parameters

uri Uri

A System.Uri specifying the absolute URI to the queue.

timeout int?

An integer specifying the server timeout interval.

timeToLiveInSeconds long?

The message time-to-live, in seconds.

visibilityTimeoutInSeconds int?

The length of time during which the message will be invisible, in seconds.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

Returns

HttpWebRequest

A HttpWebRequest object.