Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release #373

Merged
merged 10 commits into from
Jun 28, 2013
4 changes: 4 additions & 0 deletions ChangeLog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
2013.06.27 Version 0.4.4
* Make sure the response stream is drained to prevent socket exhaustion.
* Support for all flavors of SharedKey and SharedKeyLite message signing through AuthenticationScheme property on client classes.

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
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