qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ai...@apache.org
Subject svn commit: r747868 - in /qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server: ./ exchange/ management/ protocol/ queue/ security/access/management/ virtualhost/
Date Wed, 25 Feb 2009 17:47:10 GMT
Author: aidan
Date: Wed Feb 25 17:47:10 2009
New Revision: 747868

URL: http://svn.apache.org/viewvc?rev=747868&view=rev
Log:
QPID-1537: Version MBeans.

Patch from Robbie Gemmell <gemmellr@dcs.gla.ac.uk>

Modified:
    qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/AMQBrokerManagerMBean.java
    qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/AbstractExchange.java
    qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/ManagedExchange.java
    qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/management/AMQManagedObject.java
    qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/management/DefaultManagedObject.java
    qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/management/ManagedBroker.java
    qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/protocol/AMQProtocolSessionMBean.java
    qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/protocol/ManagedConnection.java
    qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/AMQQueueMBean.java
    qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/ManagedQueue.java
    qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/security/access/management/AMQUserManagementMBean.java
    qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/security/access/management/UserManagement.java
    qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/virtualhost/ManagedVirtualHost.java
    qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/virtualhost/VirtualHost.java

Modified: qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/AMQBrokerManagerMBean.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/AMQBrokerManagerMBean.java?rev=747868&r1=747867&r2=747868&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/AMQBrokerManagerMBean.java
(original)
+++ qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/AMQBrokerManagerMBean.java
Wed Feb 25 17:47:10 2009
@@ -77,7 +77,7 @@
     @MBeanConstructor("Creates the Broker Manager MBean")
     public AMQBrokerManagerMBean(VirtualHost.VirtualHostMBean virtualHostMBean) throws JMException
     {
-        super(ManagedBroker.class, ManagedBroker.TYPE);
+        super(ManagedBroker.class, ManagedBroker.TYPE, ManagedBroker.VERSION);
 
         _virtualHostMBean = virtualHostMBean;
         VirtualHost virtualHost = virtualHostMBean.getVirtualHost();

Modified: qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/AbstractExchange.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/AbstractExchange.java?rev=747868&r1=747867&r2=747868&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/AbstractExchange.java
(original)
+++ qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/AbstractExchange.java
Wed Feb 25 17:47:10 2009
@@ -38,13 +38,9 @@
 import org.apache.qpid.server.management.ManagedObject;
 import org.apache.qpid.server.management.ManagedObjectRegistry;
 import org.apache.qpid.server.queue.QueueRegistry;
-import org.apache.qpid.server.queue.AMQQueue;
 import org.apache.qpid.server.registry.ApplicationRegistry;
 import org.apache.qpid.server.virtualhost.VirtualHost;
 
-import java.util.List;
-import java.util.Map;
-
 public abstract class AbstractExchange implements Exchange, Managable
 {
     private AMQShortString _name;
@@ -81,7 +77,7 @@
         
         public ExchangeMBean() throws NotCompliantMBeanException
         {
-            super(ManagedExchange.class, ManagedExchange.TYPE);
+            super(ManagedExchange.class, ManagedExchange.TYPE, ManagedExchange.VERSION);
         }
 
         protected void init() throws OpenDataException

Modified: qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/ManagedExchange.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/ManagedExchange.java?rev=747868&r1=747867&r2=747868&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/ManagedExchange.java
(original)
+++ qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/ManagedExchange.java
Wed Feb 25 17:47:10 2009
@@ -40,6 +40,7 @@
 public interface ManagedExchange
 {
     static final String TYPE = "Exchange";
+    static final int VERSION = 1;
 
     /**
      * Returns the name of the managed exchange.

Modified: qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/management/AMQManagedObject.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/management/AMQManagedObject.java?rev=747868&r1=747867&r2=747868&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/management/AMQManagedObject.java
(original)
+++ qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/management/AMQManagedObject.java
Wed Feb 25 17:47:10 2009
@@ -50,10 +50,10 @@
 
     protected MBeanInfo _mbeanInfo;
 
-    protected AMQManagedObject(Class<?> managementInterface, String typeName)
+    protected AMQManagedObject(Class<?> managementInterface, String typeName, int version)
         throws NotCompliantMBeanException
     {
-        super(managementInterface, typeName);
+        super(managementInterface, typeName, version);
         buildMBeanInfo();
     }
 

Modified: qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/management/DefaultManagedObject.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/management/DefaultManagedObject.java?rev=747868&r1=747867&r2=747868&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/management/DefaultManagedObject.java
(original)
+++ qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/management/DefaultManagedObject.java
Wed Feb 25 17:47:10 2009
@@ -39,13 +39,15 @@
     private Class<?> _managementInterface;
 
     private String _typeName;
+    private int _version;
 
-    protected DefaultManagedObject(Class<?> managementInterface, String typeName)
+    protected DefaultManagedObject(Class<?> managementInterface, String typeName, int
version)
         throws NotCompliantMBeanException
     {
         super(managementInterface);
         _managementInterface = managementInterface;
         _typeName = typeName;
+        _version = version;
     }
 
     public String getType()
@@ -115,6 +117,10 @@
         objectName.append(getHierarchicalName(this));
         objectName.append("name=").append(name);
 
+        objectName.append(",");
+        objectName.append("version=").append(_version);
+
+
         return new ObjectName(objectName.toString());
     }
 
@@ -132,6 +138,9 @@
             objectName.append(hierarchyName.substring(0, hierarchyName.lastIndexOf(",")));
         }
 
+        objectName.append(",");
+        objectName.append("version=").append(_version);
+        
         return new ObjectName(objectName.toString());
     }
 

Modified: qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/management/ManagedBroker.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/management/ManagedBroker.java?rev=747868&r1=747867&r2=747868&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/management/ManagedBroker.java
(original)
+++ qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/management/ManagedBroker.java
Wed Feb 25 17:47:10 2009
@@ -40,12 +40,13 @@
 {
     static final String TYPE = "VirtualHostManager";
 
+    static final int VERSION = 1 ;
+
     /**
      * Creates a new Exchange.
      * @param name
      * @param type
      * @param durable
-     * @param passive
      * @throws IOException
      * @throws JMException
      */
@@ -73,7 +74,6 @@
      * @param queueName
      * @param durable
      * @param owner
-     * @param autoDelete
      * @throws IOException
      * @throws JMException
      */

Modified: qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/protocol/AMQProtocolSessionMBean.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/protocol/AMQProtocolSessionMBean.java?rev=747868&r1=747867&r2=747868&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/protocol/AMQProtocolSessionMBean.java
(original)
+++ qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/protocol/AMQProtocolSessionMBean.java
Wed Feb 25 17:47:10 2009
@@ -37,7 +37,6 @@
  */
 package org.apache.qpid.server.protocol;
 
-import java.security.Principal;
 import java.util.Date;
 import java.util.List;
 
@@ -58,7 +57,6 @@
 import javax.management.openmbean.TabularType;
 
 import org.apache.qpid.AMQException;
-import org.apache.qpid.framing.AMQFrame;
 import org.apache.qpid.framing.AMQShortString;
 import org.apache.qpid.framing.ConnectionCloseBody;
 import org.apache.qpid.framing.MethodRegistry;
@@ -93,7 +91,7 @@
     @MBeanConstructor("Creates an MBean exposing an AMQ Broker Connection")
     public AMQProtocolSessionMBean(AMQMinaProtocolSession session) throws NotCompliantMBeanException,
OpenDataException
     {
-        super(ManagedConnection.class, ManagedConnection.TYPE);
+        super(ManagedConnection.class, ManagedConnection.TYPE, ManagedConnection.VERSION);
         _session = session;
         String remote = getRemoteAddress();
         remote = "anonymous".equals(remote) ? (remote + hashCode()) : remote;

Modified: qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/protocol/ManagedConnection.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/protocol/ManagedConnection.java?rev=747868&r1=747867&r2=747868&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/protocol/ManagedConnection.java
(original)
+++ qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/protocol/ManagedConnection.java
Wed Feb 25 17:47:10 2009
@@ -41,6 +41,7 @@
 public interface ManagedConnection
 {
     static final String TYPE = "Connection";
+    static final int VERSION = 1;
 
     @MBeanAttribute(name = "ClientId", description = "Client Id")
     String getClientId();

Modified: qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/AMQQueueMBean.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/AMQQueueMBean.java?rev=747868&r1=747867&r2=747868&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/AMQQueueMBean.java
(original)
+++ qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/AMQQueueMBean.java
Wed Feb 25 17:47:10 2009
@@ -100,7 +100,7 @@
     @MBeanConstructor("Creates an MBean exposing an AMQQueue")
     public AMQQueueMBean(AMQQueue queue) throws JMException
     {
-        super(ManagedQueue.class, ManagedQueue.TYPE);
+        super(ManagedQueue.class, ManagedQueue.TYPE, ManagedQueue.VERSION);
         _queue = queue;
         _queueName = jmxEncode(new StringBuffer(queue.getName()), 0).toString();
     }

Modified: qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/ManagedQueue.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/ManagedQueue.java?rev=747868&r1=747867&r2=747868&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/ManagedQueue.java
(original)
+++ qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/ManagedQueue.java
Wed Feb 25 17:47:10 2009
@@ -41,6 +41,7 @@
 public interface ManagedQueue
 {
     static final String TYPE = "Queue";
+    static final int VERSION = 1;
 
     /**
      * Returns the Name of the ManagedQueue.

Modified: qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/security/access/management/AMQUserManagementMBean.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/security/access/management/AMQUserManagementMBean.java?rev=747868&r1=747867&r2=747868&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/security/access/management/AMQUserManagementMBean.java
(original)
+++ qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/security/access/management/AMQUserManagementMBean.java
Wed Feb 25 17:47:10 2009
@@ -104,7 +104,7 @@
 
     public AMQUserManagementMBean() throws JMException
     {
-        super(UserManagement.class, UserManagement.TYPE);
+        super(UserManagement.class, UserManagement.TYPE, UserManagement.VERSION);
     }
 
     public String getObjectInstanceName()

Modified: qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/security/access/management/UserManagement.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/security/access/management/UserManagement.java?rev=747868&r1=747867&r2=747868&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/security/access/management/UserManagement.java
(original)
+++ qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/security/access/management/UserManagement.java
Wed Feb 25 17:47:10 2009
@@ -33,7 +33,9 @@
 
 public interface UserManagement
 {
+
     String TYPE = "UserManagement";
+    int VERSION = 2;
 
     //********** Operations *****************//
     /**
@@ -115,4 +117,5 @@
                     impact = MBeanOperationInfo.INFO)
     TabularData viewUsers();
 
+
 }

Modified: qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/virtualhost/ManagedVirtualHost.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/virtualhost/ManagedVirtualHost.java?rev=747868&r1=747867&r2=747868&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/virtualhost/ManagedVirtualHost.java
(original)
+++ qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/virtualhost/ManagedVirtualHost.java
Wed Feb 25 17:47:10 2009
@@ -31,6 +31,7 @@
 public interface ManagedVirtualHost
 {
     static final String TYPE = "VirtualHost";
+    static final int VERSION = 1;
 
     /**
      * Returns the name of the managed virtualHost.

Modified: qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/virtualhost/VirtualHost.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/virtualhost/VirtualHost.java?rev=747868&r1=747867&r2=747868&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/virtualhost/VirtualHost.java
(original)
+++ qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/virtualhost/VirtualHost.java
Wed Feb 25 17:47:10 2009
@@ -121,7 +121,7 @@
     {
         public VirtualHostMBean() throws NotCompliantMBeanException
         {
-            super(ManagedVirtualHost.class, "VirtualHost");
+            super(ManagedVirtualHost.class, ManagedVirtualHost.TYPE, ManagedVirtualHost.VERSION);
         }
 
         public String getObjectInstanceName()



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org


Mime
View raw message