Author: jmesnil
Date: 2010-09-21 05:31:13 -0400 (Tue, 21 Sep 2010)
New Revision: 9705
Modified:
branches/hornetq-416/src/main/org/hornetq/api/jms/management/SubscriptionInfo.java
branches/hornetq-416/src/main/org/hornetq/jms/management/impl/JMSTopicControlImpl.java
Log:
https://jira.jboss.org/browse/HORNETQ-416
* add deliveringCount to the SubscriptionInfo returned by
JMSTopicControl.listXXXSubscriptions() methods
Modified:
branches/hornetq-416/src/main/org/hornetq/api/jms/management/SubscriptionInfo.java
===================================================================
---
branches/hornetq-416/src/main/org/hornetq/api/jms/management/SubscriptionInfo.java 2010-09-21
09:22:42 UTC (rev 9704)
+++
branches/hornetq-416/src/main/org/hornetq/api/jms/management/SubscriptionInfo.java 2010-09-21
09:31:13 UTC (rev 9705)
@@ -40,6 +40,8 @@
private final int messageCount;
+ private final int deliveringCount;
+
// Static --------------------------------------------------------
/**
@@ -58,7 +60,8 @@
sub.optString("name",
null),
sub.getBoolean("durable"),
sub.optString("selector",
null),
-
sub.getInt("messageCount"));
+
sub.getInt("messageCount"),
+
sub.getInt("deliveringCount"));
infos[i] = info;
}
@@ -72,7 +75,8 @@
final String name,
final boolean durable,
final String selector,
- final int messageCount)
+ final int messageCount,
+ final int deliveringCount)
{
this.queueName = queueName;
this.clientID = clientID;
@@ -80,6 +84,7 @@
this.durable = durable;
this.selector = selector;
this.messageCount = messageCount;
+ this.deliveringCount = deliveringCount;
}
// Public --------------------------------------------------------
@@ -131,6 +136,14 @@
{
return messageCount;
}
+
+ /**
+ * Returns the number of messages currently delivered to this subscription.
+ */
+ public int getDeliveringCount()
+ {
+ return deliveringCount;
+ }
// Package protected ---------------------------------------------
Modified:
branches/hornetq-416/src/main/org/hornetq/jms/management/impl/JMSTopicControlImpl.java
===================================================================
---
branches/hornetq-416/src/main/org/hornetq/jms/management/impl/JMSTopicControlImpl.java 2010-09-21
09:22:42 UTC (rev 9704)
+++
branches/hornetq-416/src/main/org/hornetq/jms/management/impl/JMSTopicControlImpl.java 2010-09-21
09:31:13 UTC (rev 9705)
@@ -337,6 +337,7 @@
info.put("name", subName);
info.put("durable", queue.isDurable());
info.put("messageCount", queue.getMessageCount());
+ info.put("deliveringCount", queue.getDeliveringCount());
array.put(info);
}