[jboss-cvs] JBossAS SVN: r103325 - trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/management/jms.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Mar 31 09:31:13 EDT 2010


Author: jmesnil
Date: 2010-03-31 09:31:13 -0400 (Wed, 31 Mar 2010)
New Revision: 103325

Modified:
   trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/management/jms/AddressSettingsMapper.java
   trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/management/jms/QueueManageMO.java
   trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/management/jms/TopicManageMO.java
Log:
HornetQ integration

* updated HornetQ Management API


Modified: trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/management/jms/AddressSettingsMapper.java
===================================================================
--- trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/management/jms/AddressSettingsMapper.java	2010-03-31 13:03:54 UTC (rev 103324)
+++ trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/management/jms/AddressSettingsMapper.java	2010-03-31 13:31:13 UTC (rev 103325)
@@ -21,8 +21,8 @@
 */
 package org.jboss.as.integration.hornetq.management.jms;
 
-import org.hornetq.core.security.Role;
-import org.hornetq.core.settings.impl.AddressSettings;
+import org.hornetq.api.core.management.AddressSettingsInfo;
+import org.hornetq.api.core.management.RoleInfo;
 import org.hornetq.jms.server.config.JMSQueueConfiguration;
 import org.hornetq.jms.server.config.TopicConfiguration;
 import org.jboss.metatype.api.types.*;
@@ -78,7 +78,7 @@
       SimpleMetaType.BOOLEAN_PRIMITIVE,
       SimpleMetaType.BOOLEAN_PRIMITIVE
       };
-      SECURITY_TYPE = new ImmutableCompositeMetaType("org.hornetq.core.settings.impl.Role", "Roles", securityNames, securityDescription, securityTypes);
+      SECURITY_TYPE = new ImmutableCompositeMetaType("org.hornetq.api.core.management.RoleInfo", "Roles", securityNames, securityDescription, securityTypes);
 
       TYPE = new CollectionMetaType("java.util.List", SECURITY_TYPE);
       String[] itemNames = {
@@ -126,7 +126,7 @@
           SimpleMetaType.STRING,
           TYPE
       };
-      ADDRESS_SETTINGS_TYPE = new ImmutableCompositeMetaType("org.hornetq.core.settings.impl.AddressSettings", "Address Settings",
+      ADDRESS_SETTINGS_TYPE = new ImmutableCompositeMetaType("org.hornetq.api.core.management.AddressSettingsInfo", "Address Settings",
           itemNames, itemDescriptions, itemTypes);
    }
 
@@ -146,7 +146,7 @@
          cvs.set("name", new SimpleValueSupport(SimpleMetaType.STRING, topicConfiguration.getName()));
          cvs.set("jndiBindings", new SimpleValueSupport(SimpleMetaType.STRING, getJndiString(topicConfiguration.getBindings())));
       }
-      AddressSettings addressSettings = (AddressSettings) val[1];
+      AddressSettingsInfo addressSettings = (AddressSettingsInfo) val[1];
       cvs.set("dla", new SimpleValueSupport(SimpleMetaType.STRING, addressSettings.getDeadLetterAddress()));
       cvs.set("expiryAddress", new SimpleValueSupport(SimpleMetaType.STRING, addressSettings.getExpiryAddress()));
       cvs.set("maxSize", new SimpleValueSupport(SimpleMetaType.INTEGER_PRIMITIVE, addressSettings.getMaxSizeBytes()));
@@ -160,8 +160,8 @@
       if(val.length == 3)
       {
          ArrayList<MetaValue> tmp = new ArrayList<MetaValue>();
-         Set<Role> roleSet = (Set<Role>) val[2];
-         for (Role role : roleSet)
+         RoleInfo[] roles = (RoleInfo[]) val[2];
+         for (RoleInfo role : roles)
          {
             CompositeValueSupport cvs2 = new CompositeValueSupport(SECURITY_TYPE);
             cvs2.set("name", new SimpleValueSupport(SimpleMetaType.STRING, role.getName()));

Modified: trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/management/jms/QueueManageMO.java
===================================================================
--- trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/management/jms/QueueManageMO.java	2010-03-31 13:03:54 UTC (rev 103324)
+++ trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/management/jms/QueueManageMO.java	2010-03-31 13:31:13 UTC (rev 103325)
@@ -21,8 +21,9 @@
 */
 package org.jboss.as.integration.hornetq.management.jms;
 
+import org.hornetq.api.core.management.AddressSettingsInfo;
+import org.hornetq.api.core.management.RoleInfo;
 import org.hornetq.api.jms.management.JMSQueueControl;
-import org.hornetq.core.security.Role;
 import org.hornetq.core.server.HornetQServer;
 import org.hornetq.jms.server.config.JMSQueueConfiguration;
 import org.hornetq.jms.server.config.impl.JMSQueueConfigurationImpl;
@@ -116,8 +117,10 @@
       JMSQueueControl control = (JMSQueueControl) managementService.getResource(name);
       JMSQueueConfiguration queueConfiguration = new JMSQueueConfigurationImpl(control.getName(), control.getSelector(), !control.isTemporary(), control.getJNDIBindings());
       config[0] = queueConfiguration;
-      config[1] = hornetQServerControl.getAddressSettings(name);
-      Set<Role> roles = hornetQServerControl.getSecuritySettings(name);
+      String addressSettingsAsJSON = hornetQServerControl.getAddressSettingsAsJSON(name);
+      config[1] = AddressSettingsInfo.from(addressSettingsAsJSON);
+      String rolesAsJSON = hornetQServerControl.getRolesAsJSON(name);
+      RoleInfo[] roles = RoleInfo.from(rolesAsJSON);
       config[2] = roles;
       return config;
    }

Modified: trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/management/jms/TopicManageMO.java
===================================================================
--- trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/management/jms/TopicManageMO.java	2010-03-31 13:03:54 UTC (rev 103324)
+++ trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/management/jms/TopicManageMO.java	2010-03-31 13:31:13 UTC (rev 103325)
@@ -21,6 +21,8 @@
 */
 package org.jboss.as.integration.hornetq.management.jms;
 
+import org.hornetq.api.core.management.AddressSettingsInfo;
+import org.hornetq.api.core.management.RoleInfo;
 import org.hornetq.api.jms.management.TopicControl;
 import org.hornetq.core.security.Role;
 import org.hornetq.core.server.HornetQServer;
@@ -65,8 +67,10 @@
       TopicControl control = (TopicControl) managementService.getResource(name);
       TopicConfiguration topicConfiguration = new TopicConfigurationImpl(control.getName(), control.getJNDIBindings());
       config[0] = topicConfiguration;
-      config[1] = hornetQServerControl.getAddressSettings(name);
-      Set<Role> roles = hornetQServerControl.getSecuritySettings(name);
+      String jsonString = hornetQServerControl.getAddressSettingsAsJSON(name);
+      config[1] = AddressSettingsInfo.from(jsonString);
+      String rolesAsJSON = hornetQServerControl.getRolesAsJSON(name);
+      RoleInfo[] roles = RoleInfo.from(rolesAsJSON);
       config[2] = roles;
       return config;
    }




More information about the jboss-cvs-commits mailing list