[hornetq-commits] JBoss hornetq SVN: r8864 - in trunk: src/main/org/hornetq/jms/server and 2 other directories.

do-not-reply at jboss.org do-not-reply at jboss.org
Thu Feb 4 17:18:09 EST 2010


Author: clebert.suconic at jboss.com
Date: 2010-02-04 17:18:08 -0500 (Thu, 04 Feb 2010)
New Revision: 8864

Added:
   trunk/src/main/org/hornetq/jms/server/JMSServerConfigParser.java
Modified:
   trunk/build-maven.xml
   trunk/src/main/org/hornetq/jms/server/impl/JMSServerConfigParserImpl.java
   trunk/src/main/org/hornetq/jms/server/impl/JMSServerDeployer.java
   trunk/tests/src/org/hornetq/tests/integration/jms/server/config/JMSServerConfigParserTest.java
Log:
Adding JMSServerConfigParser interface

Modified: trunk/build-maven.xml
===================================================================
--- trunk/build-maven.xml	2010-02-04 19:23:40 UTC (rev 8863)
+++ trunk/build-maven.xml	2010-02-04 22:18:08 UTC (rev 8864)
@@ -13,7 +13,7 @@
   -->
 
 <project default="upload" name="HornetQ">
-   <property name="hornetq.version" value="2.0.0.snapshot"/>
+   <property name="hornetq.version" value="2.1.0.snapshot"/>
    <property name="build.dir" value="build"/>
    <property name="jars.dir" value="${build.dir}/jars"/>
 

Added: trunk/src/main/org/hornetq/jms/server/JMSServerConfigParser.java
===================================================================
--- trunk/src/main/org/hornetq/jms/server/JMSServerConfigParser.java	                        (rev 0)
+++ trunk/src/main/org/hornetq/jms/server/JMSServerConfigParser.java	2010-02-04 22:18:08 UTC (rev 8864)
@@ -0,0 +1,66 @@
+/*
+ * Copyright 2010 Red Hat, Inc.
+ * Red Hat licenses this file to you under the Apache License, version
+ * 2.0 (the "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ * implied.  See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+package org.hornetq.jms.server;
+
+import java.io.InputStream;
+
+import org.hornetq.jms.server.config.ConnectionFactoryConfiguration;
+import org.hornetq.jms.server.config.JMSConfiguration;
+import org.hornetq.jms.server.config.QueueConfiguration;
+import org.hornetq.jms.server.config.TopicConfiguration;
+import org.w3c.dom.Node;
+
+/**
+ * A JMSServerConfigParser
+ *
+ * @author <mailto:clebert.suconic at jboss.org">Clebert Suconic</a>
+ *
+ *
+ */
+public interface JMSServerConfigParser
+{
+   /**
+    * Parse the JMS Configuration XML as a JMSConfiguration object
+    */
+   JMSConfiguration parseConfiguration(final InputStream stream) throws Exception;
+
+   /**
+    * Parse the JMS Configuration XML as a JMSConfiguration object
+    */
+   JMSConfiguration parseConfiguration(final Node rootnode) throws Exception;
+
+   /**
+    * Parse the topic node as a TopicConfiguration object
+    * @param node
+    * @return
+    * @throws Exception
+    */
+   TopicConfiguration parseTopicConfiguration(final Node node) throws Exception;
+
+   /**
+    * Parse the Queue Configuration node as a QueueConfiguration object
+    * @param node
+    * @return
+    * @throws Exception
+    */
+   QueueConfiguration parseQueueConfiguration(final Node node) throws Exception;
+
+   /**
+    * Parse the Connection Configuration node as a ConnectionFactoryConfiguration object
+    * @param node
+    * @return
+    * @throws Exception
+    */
+   ConnectionFactoryConfiguration parseConnectionFactoryConfiguration(final Node node) throws Exception;
+}

Modified: trunk/src/main/org/hornetq/jms/server/impl/JMSServerConfigParserImpl.java
===================================================================
--- trunk/src/main/org/hornetq/jms/server/impl/JMSServerConfigParserImpl.java	2010-02-04 19:23:40 UTC (rev 8863)
+++ trunk/src/main/org/hornetq/jms/server/impl/JMSServerConfigParserImpl.java	2010-02-04 22:18:08 UTC (rev 8864)
@@ -27,6 +27,7 @@
 import org.hornetq.core.config.impl.Validators;
 import org.hornetq.core.logging.Logger;
 import org.hornetq.core.server.cluster.DiscoveryGroupConfiguration;
+import org.hornetq.jms.server.JMSServerConfigParser;
 import org.hornetq.jms.server.config.ConnectionFactoryConfiguration;
 import org.hornetq.jms.server.config.JMSConfiguration;
 import org.hornetq.jms.server.config.QueueConfiguration;
@@ -49,7 +50,7 @@
  *
  *
  */
-public class JMSServerConfigParserImpl
+public class JMSServerConfigParserImpl implements JMSServerConfigParser 
 {
    private static final Logger log = Logger.getLogger(JMSServerConfigParserImpl.class);
 

Modified: trunk/src/main/org/hornetq/jms/server/impl/JMSServerDeployer.java
===================================================================
--- trunk/src/main/org/hornetq/jms/server/impl/JMSServerDeployer.java	2010-02-04 19:23:40 UTC (rev 8863)
+++ trunk/src/main/org/hornetq/jms/server/impl/JMSServerDeployer.java	2010-02-04 22:18:08 UTC (rev 8864)
@@ -19,6 +19,7 @@
 import org.hornetq.core.deployers.DeploymentManager;
 import org.hornetq.core.deployers.impl.XmlDeployer;
 import org.hornetq.core.logging.Logger;
+import org.hornetq.jms.server.JMSServerConfigParser;
 import org.hornetq.jms.server.JMSServerManager;
 import org.hornetq.jms.server.config.ConnectionFactoryConfiguration;
 import org.hornetq.jms.server.config.QueueConfiguration;
@@ -36,7 +37,7 @@
 
    private final Configuration configuration;
    
-   private final JMSServerConfigParserImpl parser;
+   private final JMSServerConfigParser parser;
 
    private final JMSServerManager jmsServerControl;
 

Modified: trunk/tests/src/org/hornetq/tests/integration/jms/server/config/JMSServerConfigParserTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/jms/server/config/JMSServerConfigParserTest.java	2010-02-04 19:23:40 UTC (rev 8863)
+++ trunk/tests/src/org/hornetq/tests/integration/jms/server/config/JMSServerConfigParserTest.java	2010-02-04 22:18:08 UTC (rev 8864)
@@ -18,6 +18,7 @@
 
 import org.hornetq.api.core.TransportConfiguration;
 import org.hornetq.core.config.Configuration;
+import org.hornetq.jms.server.JMSServerConfigParser;
 import org.hornetq.jms.server.config.ConnectionFactoryConfiguration;
 import org.hornetq.jms.server.config.JMSConfiguration;
 import org.hornetq.jms.server.config.QueueConfiguration;
@@ -53,7 +54,7 @@
       // anything so the parsing will work
       config.getConnectorConfigurations().put("netty", new TransportConfiguration());
       
-      JMSServerConfigParserImpl parser = new JMSServerConfigParserImpl(config);
+      JMSServerConfigParser parser = new JMSServerConfigParserImpl(config);
       
       String conf = "hornetq-jms-for-JMSServerDeployerTest.xml";
       URL confURL = Thread.currentThread().getContextClassLoader().getResource(conf);



More information about the hornetq-commits mailing list