summaryrefslogtreecommitdiff
path: root/java/common/src/main
diff options
context:
space:
mode:
authorKeith Wall <kwall@apache.org>2011-11-09 08:58:59 +0000
committerKeith Wall <kwall@apache.org>2011-11-09 08:58:59 +0000
commitcc6176cfb9c22ae2cdf56b03d33aca8975b7cd71 (patch)
tree83439003edd6e704dec831a1bfebd173fc33d9ef /java/common/src/main
parent539b7f434603cfffc09fb2f77cace9cd360fef77 (diff)
downloadqpid-python-cc6176cfb9c22ae2cdf56b03d33aca8975b7cd71.tar.gz
QPID-3518: Introduce client side ability to detect server side support.
Applied patch from Oleksandr Rudyy<orudyy@gmail.com> and myself. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1199662 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/common/src/main')
-rw-r--r--java/common/src/main/java/org/apache/qpid/common/ServerPropertyNames.java43
-rw-r--r--java/common/src/main/java/org/apache/qpid/util/Strings.java15
2 files changed, 58 insertions, 0 deletions
diff --git a/java/common/src/main/java/org/apache/qpid/common/ServerPropertyNames.java b/java/common/src/main/java/org/apache/qpid/common/ServerPropertyNames.java
new file mode 100644
index 0000000000..aa262bdde5
--- /dev/null
+++ b/java/common/src/main/java/org/apache/qpid/common/ServerPropertyNames.java
@@ -0,0 +1,43 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF 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.apache.qpid.common;
+
+/**
+ * Keys names used within the serverProperties argument of the ConnectionStart
+ * method. These property names are Qpid specific.
+ */
+public final class ServerPropertyNames
+{
+ /**
+ * Server property: federation tag UUID
+ */
+ public static final String FEDERATION_TAG = "qpid.federation_tag";
+
+ /**
+ * Server property: array of features supported by the server.
+ */
+ public static final String QPID_FEATURES = "qpid.features";
+
+ /**
+ * Feature: Signifies that a server supports JMS selectors.
+ */
+ public static final String FEATURE_QPID_JMS_SELECTOR = "qpid.jms-selector";
+}
diff --git a/java/common/src/main/java/org/apache/qpid/util/Strings.java b/java/common/src/main/java/org/apache/qpid/util/Strings.java
index a6a8b8beb4..fe1a300479 100644
--- a/java/common/src/main/java/org/apache/qpid/util/Strings.java
+++ b/java/common/src/main/java/org/apache/qpid/util/Strings.java
@@ -257,4 +257,19 @@ public final class Strings
return join(sep, Arrays.asList(items));
}
+ public static String printMap(Map<String,Object> map)
+ {
+ StringBuilder sb = new StringBuilder();
+ sb.append("<");
+ if (map != null)
+ {
+ for(String key : map.keySet())
+ {
+ sb.append(key).append(" = ").append(map.get(key)).append(" ");
+ }
+ }
+ sb.append(">");
+ return sb.toString();
+ }
+
}