00001 /* 00002 * Licensed to the Apache Software Foundation (ASF) under one or more 00003 * contributor license agreements. See the NOTICE file distributed with 00004 * this work for additional information regarding copyright ownership. 00005 * The ASF licenses this file to You under the Apache License, Version 2.0 00006 * (the "License"); you may not use this file except in compliance with 00007 * the License. You may obtain a copy of the License at 00008 * 00009 * http://www.apache.org/licenses/LICENSE-2.0 00010 * 00011 * Unless required by applicable law or agreed to in writing, software 00012 * distributed under the License is distributed on an "AS IS" BASIS, 00013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00014 * See the License for the specific language governing permissions and 00015 * limitations under the License. 00016 */ 00017 00018 #ifndef _ACTIVEMQ_UTIL_URISUPPORT_H_ 00019 #define _ACTIVEMQ_UTIL_URISUPPORT_H_ 00020 00021 #include <activemq/util/Config.h> 00022 #include <activemq/util/CompositeData.h> 00023 #include <decaf/util/Properties.h> 00024 #include <decaf/util/LinkedList.h> 00025 #include <decaf/lang/exceptions/IllegalArgumentException.h> 00026 00027 namespace activemq { 00028 namespace util { 00029 00030 class AMQCPP_API URISupport { 00031 public: 00032 00040 static void parseURL(const std::string& URI, decaf::util::Properties& properties); 00041 00052 static CompositeData parseComposite(const URI& uri); 00053 00066 static decaf::util::Properties parseQuery(std::string query); 00067 00077 static void parseQuery(std::string query, decaf::util::Properties* properties); 00078 00091 static std::string createQueryString(const Properties& options); 00092 00093 private: 00094 00105 static void parseComposite(const URI& uri, CompositeData& rc, const std::string& ssp); 00106 00113 static decaf::util::LinkedList<std::string> splitComponents(const std::string& str); 00114 00125 static std::string stripPrefix(const std::string& value, const std::string& prefix); 00126 00134 static bool checkParenthesis(const std::string& str); 00135 00145 static std::string replaceEnvValues(const std::string& value); 00146 00147 }; 00148 00149 }} 00150 00151 #endif /*_ACTIVEMQ_UTIL_URISUPPORT_H_*/
1.6.1