summaryrefslogtreecommitdiff
path: root/java/management/common/src
diff options
context:
space:
mode:
authorKeith Wall <kwall@apache.org>2011-11-28 09:19:15 +0000
committerKeith Wall <kwall@apache.org>2011-11-28 09:19:15 +0000
commit4ee4c8776c48bdc0a2bd1c2e34e71bf3a63e33cd (patch)
tree8f5a5c8e728615f6442f9e317518817f15a3ee74 /java/management/common/src
parent907330f70818a437f7a0723743ab98b355d80d67 (diff)
downloadqpid-python-4ee4c8776c48bdc0a2bd1c2e34e71bf3a63e33cd.tar.gz
QPID-3642,QPID-3643: Add Dead Letter Queue functionality for 0-8/0-9/0-9-1 paths, fixes isBound methods on FanoutExchange
Applied patch from Keith Wall <keith.wall@gmail.com>, Andrew MacBean <andymacbean@gmail.com> and Oleksandr Rudyy<orudyy@gmail.com> git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1207029 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/management/common/src')
-rw-r--r--java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/ManagedBroker.java19
-rw-r--r--java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/ManagedQueue.java43
-rw-r--r--java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/ServerInformation.java2
-rw-r--r--java/management/common/src/test/java/org/apache/qpid/management/common/mbeans/ManagedQueueTest.java1
4 files changed, 59 insertions, 6 deletions
diff --git a/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/ManagedBroker.java b/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/ManagedBroker.java
index b5c80a4fed..b74342df1f 100644
--- a/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/ManagedBroker.java
+++ b/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/ManagedBroker.java
@@ -23,6 +23,7 @@ package org.apache.qpid.management.common.mbeans;
import java.io.IOException;
import java.util.List;
+import java.util.Map;
import javax.management.JMException;
import javax.management.MBeanException;
@@ -118,6 +119,24 @@ public interface ManagedBroker
throws IOException, JMException, MBeanException;
/**
+ * Create a new Queue in the VirtualHost
+ *
+ * @since Qpid JMX API 2.4
+ * @param queueName name of the new queue
+ * @param durable true if the queue should be durable
+ * @param owner owner
+ * @param arguments declaration arguments for use when creating the queue, may be null.
+ * @throws IOException
+ * @throws JMException
+ */
+ @MBeanOperation(name="createNewQueue", description="Create a new Queue in the VirtualHost", impact= MBeanOperationInfo.ACTION)
+ void createNewQueue(@MBeanOperationParameter(name="queue name", description="Name of the new queue")String queueName,
+ @MBeanOperationParameter(name="owner", description="Owner name")String owner,
+ @MBeanOperationParameter(name="durable", description="true if the queue should be durable")boolean durable,
+ @MBeanOperationParameter(name="arguments", description="Map of arguments")Map<String,Object> arguments)
+ throws IOException, JMException;
+
+ /**
* Unregisters the Queue bindings, removes the subscriptions and unregisters
* from the managed objects.
*
diff --git a/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/ManagedQueue.java b/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/ManagedQueue.java
index be31d8ef88..c23a0f5076 100644
--- a/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/ManagedQueue.java
+++ b/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/ManagedQueue.java
@@ -50,7 +50,8 @@ public interface ManagedQueue
String MSG_SIZE = "Size(bytes)";
String MSG_REDELIVERED = "Redelivered";
String MSG_QUEUE_POS = "Queue Position";
- List<String> VIEW_MSGS_COMPOSITE_ITEM_NAMES_DESC = Collections.unmodifiableList(Arrays.asList(MSG_AMQ_ID, MSG_HEADER, MSG_SIZE, MSG_REDELIVERED, MSG_QUEUE_POS));
+ String MSG_DELIVERY_COUNT = "Delivery Count";
+ List<String> VIEW_MSGS_COMPOSITE_ITEM_NAMES_DESC = Collections.unmodifiableList(Arrays.asList(MSG_AMQ_ID, MSG_HEADER, MSG_SIZE, MSG_REDELIVERED, MSG_QUEUE_POS, MSG_DELIVERY_COUNT));
List<String> VIEW_MSGS_TABULAR_UNIQUE_INDEX = Collections.unmodifiableList(Arrays.asList(MSG_QUEUE_POS));
//CompositeType key/description information for message content
@@ -67,6 +68,7 @@ public interface ManagedQueue
static final String ATTR_MAX_MSG_COUNT = "MaximumMessageCount";
static final String ATTR_MAX_QUEUE_DEPTH = "MaximumQueueDepth";
static final String ATTR_MAX_MSG_SIZE = "MaximumMessageSize";
+ static final String ATTR_MAXIMUM_DELIVERY_COUNT = "MaximumDeliveryCount";
static final String ATTR_DURABLE = "Durable";
static final String ATTR_AUTODELETE = "AutoDelete";
static final String ATTR_CONSUMER_COUNT = "ConsumerCount";
@@ -78,7 +80,8 @@ public interface ManagedQueue
static final String ATTR_FLOW_OVERFULL = "FlowOverfull";
static final String ATTR_FLOW_RESUME_CAPACITY = "FlowResumeCapacity";
static final String ATTR_EXCLUSIVE = "Exclusive";
-
+ static final String ATTR_ALT_EXCHANGE = "AlternateExchange";
+
//All attribute names constant
static final List<String> QUEUE_ATTRIBUTES
= Collections.unmodifiableList(
@@ -91,6 +94,7 @@ public interface ManagedQueue
ATTR_MAX_MSG_COUNT,
ATTR_MAX_QUEUE_DEPTH,
ATTR_MAX_MSG_SIZE,
+ ATTR_MAXIMUM_DELIVERY_COUNT,
ATTR_DURABLE,
ATTR_AUTODELETE,
ATTR_CONSUMER_COUNT,
@@ -101,7 +105,9 @@ public interface ManagedQueue
ATTR_CAPACITY,
ATTR_FLOW_OVERFULL,
ATTR_FLOW_RESUME_CAPACITY,
- ATTR_EXCLUSIVE))));
+ ATTR_EXCLUSIVE,
+ ATTR_ALT_EXCHANGE
+ ))));
/**
* Returns the Name of the ManagedQueue.
@@ -120,6 +126,16 @@ public interface ManagedQueue
Integer getMessageCount() throws IOException;
/**
+ * Maximum number of times a message is permitted to be delivered or zero if not enforced.
+ *
+ * @since Qpid JMX API 2.4
+ * @return maximum delivery count
+ * @throws IOException
+ */
+ @MBeanAttribute(name="MaximumDeliveryCount", description = "Maximum number of times a message is permitted to be delivered or zero if not enforced")
+ Integer getMaximumDeliveryCount() throws IOException;
+
+ /**
* Tells the total number of messages receieved by the queue since startup.
* @return total number of messages received.
* @throws IOException
@@ -309,7 +325,7 @@ public interface ManagedQueue
/**
* Sets whether the queue is exclusive or not.
- *
+ *
* @since Qpid JMX API 2.0
* @param exclusive the capacity in bytes
* @throws IOException
@@ -318,6 +334,25 @@ public interface ManagedQueue
@MBeanAttribute(name="Exclusive", description="Whether the queue is Exclusive or not")
void setExclusive(boolean exclusive) throws IOException, JMException;
+ /**
+ * Sets the Alternate Exchange for the queue, for use in dead letter queue functionality.
+ *
+ * @since Qpid JMX API 2.4
+ * @param the name of the exchange to use. Specifying null or the empty string will clear the alternate exchange.
+ * @throws IOException
+ */
+ void setAlternateExchange(String exchangeName) throws IOException;
+
+ /**
+ * Returns the name of the Alternate Exchange for the queue, or null if there isn't one.
+ *
+ * @since Qpid JMX API 2.4
+ * @return the name of the Alternate Exchange for the queue, or null if there isn't one
+ * @throws IOException
+ */
+ @MBeanAttribute(name="AlternateExchange", description="Alternate exchange for the queue")
+ String getAlternateExchange() throws IOException;
+
//********** Operations *****************//
diff --git a/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/ServerInformation.java b/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/ServerInformation.java
index 12ae69571e..9d40edd8d0 100644
--- a/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/ServerInformation.java
+++ b/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/ServerInformation.java
@@ -47,7 +47,7 @@ public interface ServerInformation
* Qpid JMX API 1.1 can be assumed.
*/
int QPID_JMX_API_MAJOR_VERSION = 2;
- int QPID_JMX_API_MINOR_VERSION = 3;
+ int QPID_JMX_API_MINOR_VERSION = 4;
/**
diff --git a/java/management/common/src/test/java/org/apache/qpid/management/common/mbeans/ManagedQueueTest.java b/java/management/common/src/test/java/org/apache/qpid/management/common/mbeans/ManagedQueueTest.java
index 1a4a73f207..c931b921df 100644
--- a/java/management/common/src/test/java/org/apache/qpid/management/common/mbeans/ManagedQueueTest.java
+++ b/java/management/common/src/test/java/org/apache/qpid/management/common/mbeans/ManagedQueueTest.java
@@ -23,7 +23,6 @@ package org.apache.qpid.management.common.mbeans;
import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;
import java.lang.reflect.Proxy;
-import java.util.ArrayList;
import java.util.List;
import javax.management.MBeanAttributeInfo;