Skip to content

Commit

Permalink
Merge pull request #379 from WindowsAzure/master
Browse files Browse the repository at this point in the history
pull from public master to public dev
  • Loading branch information
xuezhai committed Jul 3, 2013
2 parents 3413c7d + 4720f7a commit 4fd1ce0
Show file tree
Hide file tree
Showing 40 changed files with 1,311 additions and 185 deletions.
9 changes: 9 additions & 0 deletions ChangeLog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
2013.07.03 Version 0.4.4
* Windows Azure China environemnt support
* Service Bus metadata support updated to the latest version
* Rich Odata entity query support for Service Bus Queue/Topic/Subscription
* Added support for Service Bus message forwarding
* Added support for Service Bus message count details
* Made sure the response stream is drained to prevent socket exhaustion in Storage
* Added support for all flavors of SharedKey and SharedKeyLite message signing through AuthenticationScheme property on client classes in Storage

2013.05.27 Version 0.4.3
* Added support for updating existing Queue/Topic/Subscription for Service Bus
* Added support for message lock renewal to support long running message processing for Service Bus
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,14 @@ This project provides a client library in Java that makes it easy to consume Win
* Create/Read/Update/Delete queues
* Send/Receive/Unlock/Delete messages
* Renew message lock
* Message forwarding
* Topics
* Create/Read/Update/Delete topics
* Create/Read/Update/Delete subscriptions
* Create/Read/Update/Delete rules
* Send/Receive/Unlock/Delete messages
* Renew message lock
* Message forwarding
* Media Services
* Create/Read/Update/Delete access policies
* Create/Read/Update/Delete asset files
Expand Down Expand Up @@ -57,7 +59,7 @@ within your project you can also have them installed by the Java package manager
<dependency>
<groupId>com.microsoft.windowsazure</groupId>
<artifactId>microsoft-windowsazure-api</artifactId>
<version>0.4.2</version>
<version>0.4.4</version>
</dependency>
```

Expand Down
2 changes: 1 addition & 1 deletion microsoft-azure-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.microsoft.windowsazure</groupId>
<artifactId>microsoft-windowsazure-api</artifactId>
<version>0.4.3</version>
<version>0.4.4</version>
<packaging>jar</packaging>

<name>Microsoft Windows Azure Client API</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -295,8 +295,9 @@ public String execute(final CloudBlobClient client, final CloudBlob blob, final
final HttpURLConnection request = BlobRequest.lease(blob.getTransformedAddress(opContext), this
.getRequestOptions().getTimeoutIntervalInMs(), LeaseAction.ACQUIRE, leaseTimeInSeconds,
proposedLeaseId, null, accessCondition, blobOptions, opContext);
this.setConnection(request);

client.getCredentials().signRequest(request, 0L);
this.signRequest(client, request, 0L, null);

ExecutionEngine.processRequest(request, opContext, this.getResult());

Expand Down Expand Up @@ -407,8 +408,9 @@ public Long execute(final CloudBlobClient client, final CloudBlob blob, final Op
final HttpURLConnection request = BlobRequest.lease(blob.getTransformedAddress(opContext), this
.getRequestOptions().getTimeoutIntervalInMs(), LeaseAction.BREAK, null, null,
breakPeriodInSeconds, accessCondition, blobOptions, opContext);
this.setConnection(request);

client.getCredentials().signRequest(request, 0L);
this.signRequest(client, request, 0L, null);

ExecutionEngine.processRequest(request, opContext, this.getResult());

Expand Down Expand Up @@ -540,9 +542,11 @@ public Void execute(final CloudBlobClient client, final CloudBlob blob, final Op
final HttpURLConnection request = BlobRequest.copyFrom(blob.getTransformedAddress(opContext),
blobOptions.getTimeoutIntervalInMs(), source.toString(), blob.snapshotID,
sourceAccessCondition, destinationAccessCondition, blobOptions, opContext);
this.setConnection(request);

BlobRequest.addMetadata(request, blob.metadata, opContext);
client.getCredentials().signRequest(request, 0);

this.signRequest(client, request, 0, null);

ExecutionEngine.processRequest(request, opContext, this.getResult());

Expand Down Expand Up @@ -620,8 +624,9 @@ public Void execute(final CloudBlobClient client, final CloudBlob blob, final Op

final HttpURLConnection request = BlobRequest.abortCopy(blob.getTransformedAddress(opContext),
blobOptions.getTimeoutIntervalInMs(), copyId, accessCondition, blobOptions, opContext);
this.setConnection(request);

client.getCredentials().signRequest(request, 0);
this.signRequest(client, request, 0, null);

ExecutionEngine.processRequest(request, opContext, this.getResult());

Expand Down Expand Up @@ -695,8 +700,9 @@ public CloudBlob execute(final CloudBlobClient client, final CloudBlob blob,

final HttpURLConnection request = BlobRequest.snapshot(blob.getTransformedAddress(opContext), this
.getRequestOptions().getTimeoutIntervalInMs(), accessCondition, blobOptions, opContext);
this.setConnection(request);

client.getCredentials().signRequest(request, 0L);
this.signRequest(client, request, 0L, null);

ExecutionEngine.processRequest(request, opContext, this.getResult());

Expand Down Expand Up @@ -784,8 +790,9 @@ public Void execute(final CloudBlobClient client, final CloudBlob blob, final Op
final HttpURLConnection request = BlobRequest.delete(blob.getTransformedAddress(opContext), this
.getRequestOptions().getTimeoutIntervalInMs(), blob.snapshotID, deleteSnapshotsOption,
accessCondition, blobOptions, opContext);
this.setConnection(request);

client.getCredentials().signRequest(request, -1L);
this.signRequest(client, request, -1L, null);

ExecutionEngine.processRequest(request, opContext, this.getResult());

Expand Down Expand Up @@ -875,8 +882,9 @@ public Boolean execute(final CloudBlobClient client, final CloudBlob blob, final
final HttpURLConnection request = BlobRequest.delete(blob.getTransformedAddress(opContext), this
.getRequestOptions().getTimeoutIntervalInMs(), blob.snapshotID, deleteSnapshotsOption,
accessCondition, blobOptions, opContext);
this.setConnection(request);

client.getCredentials().signRequest(request, -1L);
this.signRequest(client, request, -1L, null);

ExecutionEngine.processRequest(request, opContext, this.getResult());

Expand Down Expand Up @@ -959,8 +967,10 @@ public Void execute(final CloudBlobClient client, final CloudBlob blob, final Op

final HttpURLConnection request = BlobRequest.get(blob.getTransformedAddress(opContext),
blobOptions.getTimeoutIntervalInMs(), blob.snapshotID, accessCondition, blobOptions, opContext);
this.setConnection(request);

this.signRequest(client, request, -1L, null);

client.getCredentials().signRequest(request, -1L);
final InputStream streamRef = ExecutionEngine.getInputStream(request, opContext, this.getResult());

final String contentMD5 = request.getHeaderField(Constants.HeaderConstants.CONTENT_MD5);
Expand Down Expand Up @@ -1137,8 +1147,9 @@ public Void execute(final CloudBlobClient client, final CloudBlob blob, final Op
final HttpURLConnection request = BlobRequest.getProperties(blob.getTransformedAddress(opContext), this
.getRequestOptions().getTimeoutIntervalInMs(), blob.snapshotID, accessCondition, blobOptions,
opContext);
this.setConnection(request);

client.getCredentials().signRequest(request, -1L);
this.signRequest(client, request, -1L, null);

ExecutionEngine.processRequest(request, opContext, this.getResult());

Expand Down Expand Up @@ -1290,12 +1301,13 @@ public Void execute(final CloudBlobClient client, final CloudBlob blob, final Op
final HttpURLConnection request = BlobRequest.get(blob.getTransformedAddress(opContext),
blobOptions.getTimeoutIntervalInMs(), blob.snapshotID, blobOffset, length, accessCondition,
blobOptions, opContext);
this.setConnection(request);

if (blobOptions.getUseTransactionalContentMD5()) {
request.setRequestProperty(Constants.HeaderConstants.RANGE_GET_CONTENT_MD5, "true");
}

client.getCredentials().signRequest(request, -1L);
this.signRequest(client, request, -1L, null);

final InputStream sourceStream = ExecutionEngine.getInputStream(request, opContext, this.getResult());

Expand Down Expand Up @@ -1430,8 +1442,9 @@ public Boolean execute(final CloudBlobClient client, final CloudBlob blob, final
final HttpURLConnection request = BlobRequest.getProperties(blob.getTransformedAddress(opContext), this
.getRequestOptions().getTimeoutIntervalInMs(), blob.snapshotID, accessCondition, blobOptions,
opContext);
this.setConnection(request);

client.getCredentials().signRequest(request, -1L);
this.signRequest(client, request, -1L, null);

ExecutionEngine.processRequest(request, opContext, this.getResult());

Expand Down Expand Up @@ -1917,8 +1930,9 @@ public Void execute(final CloudBlobClient client, final CloudBlob blob, final Op
final HttpURLConnection request = BlobRequest.lease(blob.getTransformedAddress(opContext), this
.getRequestOptions().getTimeoutIntervalInMs(), LeaseAction.RELEASE, null, null, null,
accessCondition, blobOptions, opContext);
this.setConnection(request);

client.getCredentials().signRequest(request, 0L);
this.signRequest(client, request, 0L, null);

ExecutionEngine.processRequest(request, opContext, this.getResult());

Expand Down Expand Up @@ -1997,8 +2011,9 @@ public Void execute(final CloudBlobClient client, final CloudBlob blob, final Op
final HttpURLConnection request = BlobRequest.lease(blob.getTransformedAddress(opContext), this
.getRequestOptions().getTimeoutIntervalInMs(), LeaseAction.RENEW, null, null, null,
accessCondition, blobOptions, opContext);
this.setConnection(request);

client.getCredentials().signRequest(request, 0L);
this.signRequest(client, request, 0L, null);

ExecutionEngine.processRequest(request, opContext, this.getResult());

Expand Down Expand Up @@ -2086,8 +2101,9 @@ public Void execute(final CloudBlobClient client, final CloudBlob blob, final Op
final HttpURLConnection request = BlobRequest.lease(blob.getTransformedAddress(opContext), this
.getRequestOptions().getTimeoutIntervalInMs(), LeaseAction.CHANGE, null, proposedLeaseId, null,
accessCondition, blobOptions, opContext);
this.setConnection(request);

client.getCredentials().signRequest(request, 0L);
this.signRequest(client, request, 0L, null);

ExecutionEngine.processRequest(request, opContext, this.getResult());

Expand Down Expand Up @@ -2213,8 +2229,9 @@ public Long execute(final CloudBlobClient client, final CloudBlob blob, final Op
final HttpURLConnection request = BlobRequest.lease(blob.getTransformedAddress(opContext), this
.getRequestOptions().getTimeoutIntervalInMs(), LeaseAction.BREAK, null, null, null,
accessCondition, blobOptions, opContext);
this.setConnection(request);

client.getCredentials().signRequest(request, 0L);
this.signRequest(client, request, 0L, null);

ExecutionEngine.processRequest(request, opContext, this.getResult());

Expand Down Expand Up @@ -2351,10 +2368,11 @@ public Void execute(final CloudBlobClient client, final CloudBlob blob, final Op
final HttpURLConnection request = BlobRequest.put(blob.getTransformedAddress(opContext), this
.getRequestOptions().getTimeoutIntervalInMs(), blob.properties, blob.properties.getBlobType(),
0, accessCondition, blobOptions, opContext);
this.setConnection(request);

BlobRequest.addMetadata(request, blob.metadata, opContext);

client.getCredentials().signRequest(request, length);
this.signRequest(client, request, length, null);

final StreamMd5AndLength descriptor = Utility.writeToOutputStream(sourceStream,
request.getOutputStream(), length, true, false, null, opContext);
Expand Down Expand Up @@ -2436,9 +2454,11 @@ public Void execute(final CloudBlobClient client, final CloudBlob blob, final Op

final HttpURLConnection request = BlobRequest.setMetadata(blob.getTransformedAddress(opContext), this
.getRequestOptions().getTimeoutIntervalInMs(), accessCondition, blobOptions, opContext);
this.setConnection(request);

BlobRequest.addMetadata(request, blob.metadata, opContext);
client.getCredentials().signRequest(request, 0L);

this.signRequest(client, request, 0L, null);

ExecutionEngine.processRequest(request, opContext, this.getResult());

Expand Down Expand Up @@ -2510,9 +2530,11 @@ public Void execute(final CloudBlobClient client, final CloudBlob blob, final Op
final HttpURLConnection request = BlobRequest.setProperties(blob.getTransformedAddress(opContext), this
.getRequestOptions().getTimeoutIntervalInMs(), blob.properties, null, accessCondition,
blobOptions, opContext);
this.setConnection(request);

BlobRequest.addMetadata(request, blob.metadata, opContext);
client.getCredentials().signRequest(request, 0L);

this.signRequest(client, request, 0L, null);

ExecutionEngine.processRequest(request, opContext, this.getResult());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -385,8 +385,9 @@ ResultSegment<CloudBlobContainer> listContainersCore(final String prefix,

final HttpURLConnection listContainerRequest = ContainerRequest.list(this.getEndpoint(),
options.getTimeoutIntervalInMs(), listingContext, detailsIncluded, opContext);
taskReference.setConnection(listContainerRequest);

this.getCredentials().signRequest(listContainerRequest, -1L);
taskReference.signRequest(this, listContainerRequest, -1L, null);

ExecutionEngine.processRequest(listContainerRequest, opContext, taskReference.getResult());

Expand Down
Loading

0 comments on commit 4fd1ce0

Please sign in to comment.