From 677f14b7d2df0c970b00803f132eb70e249775dd Mon Sep 17 00:00:00 2001 From: Rajith Muditha Attapattu Date: Fri, 14 Sep 2007 20:43:16 +0000 Subject: Took out the URL parsing logic from the AMQConnectionURL and moved in two Parser classes. The Connection Type (0-8 or 0-10) is decided based on the URL scheme if AMQConnection is created by passing a URL. In other cases it will be based on a jvm switch. Other constructors in AMQConnection internally constructs an 0-8 URL and call the constrcutor with a URL. In that case it is difficult to figure out the type of connection with out additional information. The additional information commes in the form of the following jvm arguments SwitchCon - enables this switch 0-10 - creates an 0-10 connection and the absence of it creates an 0-8 connection This was done to minimize any impact on the test code. currently only one code path can be tested at a given time. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@575789 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/java/common/src/main/java/org/apache/qpid/url/URLHelper.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'qpid/java/common') diff --git a/qpid/java/common/src/main/java/org/apache/qpid/url/URLHelper.java b/qpid/java/common/src/main/java/org/apache/qpid/url/URLHelper.java index c08b443acf..2d496d2d54 100644 --- a/qpid/java/common/src/main/java/org/apache/qpid/url/URLHelper.java +++ b/qpid/java/common/src/main/java/org/apache/qpid/url/URLHelper.java @@ -21,6 +21,7 @@ package org.apache.qpid.url; import java.util.HashMap; +import java.util.Map; public class URLHelper { @@ -28,7 +29,7 @@ public class URLHelper public static char ALTERNATIVE_OPTION_SEPARATOR = ','; public static char BROKER_SEPARATOR = ';'; - public static void parseOptions(HashMap optionMap, String options) throws URLSyntaxException + public static void parseOptions(Map optionMap, String options) throws URLSyntaxException { // options looks like this // brokerlist='tcp://host:port?option='value',option='value';vm://:3/virtualpath?option='value'',failover='method?option='value',option='value'' @@ -142,7 +143,7 @@ public class URLHelper return new URLSyntaxException(url, error, index, length); } - public static String printOptions(HashMap options) + public static String printOptions(Map options) { if (options.isEmpty()) { -- cgit v1.2.1