activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
Subject svn commit: r415641 - in /incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx: SubscriptionView.java SubscriptionViewMBean.java
Date Tue, 20 Jun 2006 13:51:58 GMT
Author: jstrachan
Date: Tue Jun 20 06:51:57 2006
New Revision: 415641

URL: http://svn.apache.org/viewvc?rev=415641&view=rev
Log:
fix for AMQ-663 to add more attributes to the subscription MBean

Modified:
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/SubscriptionView.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/SubscriptionViewMBean.java

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/SubscriptionView.java
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/SubscriptionView.java?rev=415641&r1=415640&r2=415641&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/SubscriptionView.java
(original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/SubscriptionView.java
Tue Jun 20 06:51:57 2006
@@ -165,6 +165,65 @@
     }
     
     /**
+     * @return whether or not the subscriber is retroactive or not
+     */
+    public boolean isRetroactive() {
+        ConsumerInfo info = getConsumerInfo();
+        return info != null ? info.isRetroactive() : false;
+    }
+    
+    /**
+     * @return whether or not the subscriber is an exclusive consumer
+     */
+    public boolean isExclusive() {
+        ConsumerInfo info = getConsumerInfo();
+        return info != null ? info.isExclusive() : false;
+    }
+    
+    
+    /**
+     * @return whether or not the subscriber is durable (persistent)
+     */
+    public boolean isDurable() {
+        ConsumerInfo info = getConsumerInfo();
+        return info != null ? info.isDurable() : false;
+    }
+    
+    /**
+     * @return whether or not the subscriber ignores local messages
+     */
+    public boolean isNoLocal() {
+        ConsumerInfo info = getConsumerInfo();
+        return info != null ? info.isNoLocal() : false;
+    }
+    
+    
+    /**
+     * @return the maximum number of pending messages allowed in addition to the prefetch
size. If enabled
+     * to a non-zero value then this will perform eviction of messages for slow consumers
on non-durable topics.
+     */
+    public int getMaximumPendingMessageLimit() {
+        ConsumerInfo info = getConsumerInfo();
+        return info != null ? info.getMaximumPendingMessageLimit() : 0;
+    }
+    
+    /**
+     * @return the consumer priority
+     */
+    public byte getPriority() {
+        ConsumerInfo info = getConsumerInfo();
+        return info != null ? info.getPriority() : 0;
+    }
+    
+    /**
+     * @return the name of the consumer which is only used for durable consumers.
+     */
+    public String getSubcriptionName() {
+        ConsumerInfo info = getConsumerInfo();
+        return info != null ? info.getSubcriptionName() : null;
+    }
+    
+    /**
      * @return number of messages pending delivery
      */
     public int getPendingQueueSize(){
@@ -216,4 +275,4 @@
         return subscription != null ? subscription.getPrefetchSize() : 0;
     }
 
-}
\ No newline at end of file
+}

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/SubscriptionViewMBean.java
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/SubscriptionViewMBean.java?rev=415641&r1=415640&r2=415641&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/SubscriptionViewMBean.java
(original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/SubscriptionViewMBean.java
Tue Jun 20 06:51:57 2006
@@ -18,12 +18,13 @@
 /**
  * @version $Revision: 1.5 $
  */
-public interface SubscriptionViewMBean{
-    
+public interface SubscriptionViewMBean {
+
     /**
      * @return the clientId of the Connection the Subscription is on
      */
     public String getClientId();
+
     /**
      * @return the id of the Connection the Subscription is on
      */
@@ -44,18 +45,17 @@
      */
     public String getDestinationName();
 
-
     /**
      * @return the JMS selector on the current subscription
      */
     public String getSelector();
-    
+
     /**
-     * Attempts to change the current active selector on the subscription.
-     * This operation is not supported for persistent topics.
+     * Attempts to change the current active selector on the subscription. This
+     * operation is not supported for persistent topics.
      */
     public void setSelector(String selector) throws InvalidSelectorException, UnsupportedOperationException;
-    
+
     /**
      * @return true if the destination is a Queue
      */
@@ -70,7 +70,7 @@
      * @return true if the destination is temporary
      */
     public boolean isDestinationTemporary();
-    
+
     /**
      * @return true if the subscriber is active
      */
@@ -85,7 +85,7 @@
      * @return number of messages dispatched
      */
     public int getDispatchedQueueSize();
-    
+
     /**
      * @return number of messages that matched the subscription
      */
@@ -105,4 +105,43 @@
      * @return the prefetch that has been configured for this subscriber
      */
     public int getPrefetchSize();
+
+    /**
+     * @return whether or not the subscriber is retroactive or not
+     */
+    public boolean isRetroactive();
+
+    /**
+     * @return whether or not the subscriber is an exclusive consumer
+     */
+    public boolean isExclusive();
+
+    /**
+     * @return whether or not the subscriber is durable (persistent)
+     */
+    public boolean isDurable();
+
+    /**
+     * @return whether or not the subscriber ignores local messages
+     */
+    public boolean isNoLocal();
+
+    /**
+     * @return the maximum number of pending messages allowed in addition to the
+     *         prefetch size. If enabled to a non-zero value then this will
+     *         perform eviction of messages for slow consumers on non-durable
+     *         topics.
+     */
+    public int getMaximumPendingMessageLimit();
+
+    /**
+     * @return the consumer priority
+     */
+    public byte getPriority();
+
+    /**
+     * @return the name of the consumer which is only used for durable
+     *         consumers.
+     */
+    public String getSubcriptionName();
 }



Mime
View raw message