Skip to content
Merged

Dev #343

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
7cd1550
Merge pull request #656 from jcookems/dev
jcookems Mar 22, 2013
ecf2f64
Merge pull request #318 from WindowsAzure/release
xuezhai Apr 9, 2013
a5b014d
Merge pull request #661 from xuezhai/dev
xuezhai Apr 10, 2013
811ae67
update queue.
Apr 17, 2013
375de7e
Merge pull request #108 from gcheng/updateQueue
Apr 17, 2013
786dd2e
update service bus topic.
Apr 18, 2013
9109a1c
Minor change to update topic.
Apr 18, 2013
530b641
Merge pull request #109 from gcheng/updateTopic
Apr 18, 2013
4c84ba2
Enable update subscription.
Apr 18, 2013
6f050b5
Merge branch 'dev' of https://github.com/gcheng/azure-sdk-for-java-pr…
Apr 19, 2013
05c351f
Merge pull request #110 from gcheng/updateSub
Apr 19, 2013
7fe0d66
Merge pull request #664 from gcheng/dev
Apr 19, 2013
b84180e
initial checkin to update QueueDescription
Apr 23, 2013
0d77d64
update the product code to make sure that the new QueueInfo is builda…
Apr 23, 2013
ed53fd2
initial check in for the scaffold of the QueueInfoTest
Apr 23, 2013
4e122be
update unit test for QueueInfo
Apr 23, 2013
da53615
all the queue info unit tests passes.
Apr 24, 2013
a56d910
ensure all the unit tests passes.
Apr 24, 2013
2a601b0
update queue info.
Apr 24, 2013
8f51a94
Merge pull request #111 from gcheng/updateProperties
Apr 25, 2013
4fc65b6
Merge pull request #669 from gcheng/dev
Apr 25, 2013
028d7fd
update the schema for Topic, Subscription and Rule.
Apr 25, 2013
1451eb7
implement RuleInfo.
Apr 26, 2013
4e4b921
add support for properties in subscription.
Apr 26, 2013
49aaecc
update Topic Info for service bus.
Apr 26, 2013
5900a32
generates Javadoc for Rule/Subscription/Topic.
Apr 26, 2013
824372a
improve javadoc for queue/topic/rule/subscription.
Apr 26, 2013
3ffbe25
Merge pull request #113 from gcheng/updateProperties
Apr 30, 2013
e80ab97
Merge pull request #670 from gcheng/dev
Apr 30, 2013
aeb3267
Merge branch 'dev' of https://github.com/gcheng/azure-sdk-for-java-pr…
Apr 30, 2013
d72553e
initial check in for renew lock.
Apr 30, 2013
0a786dd
Merge branch 'dev' of https://github.com/gcheng/azure-sdk-for-java-pr…
Apr 30, 2013
015831d
get renew lock working.
May 1, 2013
156a56e
get unit test pass for renew message.
May 1, 2013
da52232
code clean up!
May 1, 2013
aa66c8a
Merge pull request #114 from gcheng/renewlock
May 1, 2013
9f3e33c
Merge pull request #673 from gcheng/dev
May 1, 2013
bca8eae
fix a unit test failure for topic info.
May 1, 2013
10f93e0
remove message count details and forward to for JSR review.
May 3, 2013
7c6b2b9
Merge pull request #116 from gcheng/unittestfix
May 3, 2013
2c21739
Merge pull request #117 from gcheng/jsrreview
May 3, 2013
3acff2a
Merge pull request #674 from gcheng/dev
May 3, 2013
ee6841f
remove authorization rule from this release.
May 6, 2013
d76235a
Merge pull request #118 from gcheng/removeauthrule
May 6, 2013
34ef686
Merge pull request #676 from gcheng/dev
May 6, 2013
689ea78
integration testing of metadata.
May 15, 2013
f3d7021
Merge pull request #119 from gcheng/integrationtest
May 15, 2013
d618563
Merge pull request #678 from gcheng/dev
May 15, 2013
f4ae1b8
Merge branch 'release' of https://github.com/WindowsAzure/azure-sdk-f…
May 17, 2013
57c26c6
Merge pull request #39 from gcheng/release
May 17, 2013
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,19 @@ public ListQueuesResult listQueues() throws ServiceException {
}
}

@Override
public QueueInfo updateQueue(QueueInfo queueInfo) throws ServiceException {
try {
return next.updateQueue(queueInfo);
}
catch (UniformInterfaceException e) {
throw processCatch(new ServiceException(e));
}
catch (ClientHandlerException e) {
throw processCatch(new ServiceException(e));
}
}

@Override
public CreateTopicResult createTopic(TopicInfo topic) throws ServiceException {
try {
Expand Down Expand Up @@ -290,6 +303,19 @@ public ListTopicsResult listTopics() throws ServiceException {
}
}

@Override
public TopicInfo updateTopic(TopicInfo topicInfo) throws ServiceException {
try {
return next.updateTopic(topicInfo);
}
catch (UniformInterfaceException e) {
throw processCatch(new ServiceException(e));
}
catch (ClientHandlerException e) {
throw processCatch(new ServiceException(e));
}
}

@Override
public CreateSubscriptionResult createSubscription(String topicPath, SubscriptionInfo subscription)
throws ServiceException {
Expand Down Expand Up @@ -343,6 +369,20 @@ public ListSubscriptionsResult listSubscriptions(String topicPath) throws Servic
}
}

@Override
public SubscriptionInfo updateSubscription(String topicName, SubscriptionInfo subscriptionInfo)
throws ServiceException {
try {
return next.updateSubscription(topicName, subscriptionInfo);
}
catch (UniformInterfaceException e) {
throw processCatch(new ServiceException(e));
}
catch (ClientHandlerException e) {
throw processCatch(new ServiceException(e));
}
}

@Override
public CreateRuleResult createRule(String topicPath, String subscriptionName, RuleInfo rule)
throws ServiceException {
Expand Down Expand Up @@ -489,4 +529,31 @@ public ReceiveMessageResult receiveMessage(String path, ReceiveMessageOptions op
}
}

@Override
public void renewQueueLock(String queueName, String messageId, String lockToken) throws ServiceException {
try {
next.renewQueueLock(queueName, messageId, lockToken);
}
catch (UniformInterfaceException e) {
throw processCatch(new ServiceException(e));
}
catch (ClientHandlerException e) {
throw processCatch(new ServiceException(e));
}
}

@Override
public void renewSubscriptionLock(String topicName, String subscriptionName, String messageId, String lockToken)
throws ServiceException {
try {
next.renewSubscriptionLock(topicName, subscriptionName, messageId, lockToken);
}
catch (UniformInterfaceException e) {
throw processCatch(new ServiceException(e));
}
catch (ClientHandlerException e) {
throw processCatch(new ServiceException(e));
}
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import com.microsoft.windowsazure.services.core.ServiceFilter;
import com.microsoft.windowsazure.services.core.UserAgentFilter;
import com.microsoft.windowsazure.services.core.utils.pipeline.ClientFilterAdapter;
import com.microsoft.windowsazure.services.core.utils.pipeline.PipelineHelpers;
import com.microsoft.windowsazure.services.serviceBus.ServiceBusContract;
import com.microsoft.windowsazure.services.serviceBus.models.AbstractListOptions;
import com.microsoft.windowsazure.services.serviceBus.models.BrokeredMessage;
Expand Down Expand Up @@ -109,7 +110,7 @@ public void setChannel(Client channel) {
}

private WebResource getResource() {
WebResource resource = getChannel().resource(uri);
WebResource resource = getChannel().resource(uri).queryParam("api-version", "2012-08");
for (ServiceFilter filter : filters) {
resource.addFilter(new ClientFilterAdapter(filter));
}
Expand Down Expand Up @@ -293,6 +294,12 @@ public ListQueuesResult listQueues(ListQueuesOptions options) throws ServiceExce
return result;
}

@Override
public QueueInfo updateQueue(QueueInfo queueInfo) throws ServiceException {
return getResource().path(queueInfo.getPath()).type("application/atom+xml;type=entry;charset=utf-8")
.header("If-Match", "*").put(QueueInfo.class, queueInfo);
}

private WebResource listOptions(AbstractListOptions<?> options, WebResource path) {
if (options.getTop() != null) {
path = path.queryParam("$top", options.getTop().toString());
Expand Down Expand Up @@ -331,6 +338,12 @@ public ListTopicsResult listTopics(ListTopicsOptions options) throws ServiceExce
return result;
}

@Override
public TopicInfo updateTopic(TopicInfo topicInfo) throws ServiceException {
return getResource().path(topicInfo.getPath()).type("application/atom+xml;type=entry;charset=utf-8")
.header("If-Match", "*").put(TopicInfo.class, topicInfo);
}

@Override
public CreateSubscriptionResult createSubscription(String topicPath, SubscriptionInfo subscription) {
return new CreateSubscriptionResult(getResource().path(topicPath).path("subscriptions")
Expand Down Expand Up @@ -361,6 +374,14 @@ public ListSubscriptionsResult listSubscriptions(String topicPath, ListSubscript
return result;
}

@Override
public SubscriptionInfo updateSubscription(String topicName, SubscriptionInfo subscriptionInfo)
throws ServiceException {
return getResource().path(topicName).path("subscriptions").path(subscriptionInfo.getName())
.type("application/atom+xml;type=entry;charset=utf-8").header("If-Match", "*")
.put(SubscriptionInfo.class, subscriptionInfo);
}

@Override
public CreateRuleResult createRule(String topicPath, String subscriptionName, RuleInfo rule) {
return new CreateRuleResult(getResource().path(topicPath).path("subscriptions").path(subscriptionName)
Expand Down Expand Up @@ -414,4 +435,19 @@ public ListRulesResult listRules(String topicName, String subscriptionName) thro
return listRules(topicName, subscriptionName, ListRulesOptions.DEFAULT);
}

@Override
public void renewQueueLock(String queueName, String messageId, String lockToken) throws ServiceException {
ClientResponse clientResponse = getResource().path(queueName).path("messages").path(messageId).path(lockToken)
.post(ClientResponse.class, "");
PipelineHelpers.ThrowIfNotSuccess(clientResponse);
}

@Override
public void renewSubscriptionLock(String topicName, String subscriptionName, String messageId, String lockToken)
throws ServiceException {
ClientResponse clientResponse = getResource().path(topicName).path("Subscriptions").path(subscriptionName)
.path("messages").path(messageId).path(lockToken).post(ClientResponse.class, "");
PipelineHelpers.ThrowIfNotSuccess(clientResponse);
}

}
Loading