|
activemq-cpp-3.4.0
|
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, 00041 decaf::util::Properties& properties ); 00042 00053 static CompositeData parseComposite( const URI& uri ); 00054 00067 static decaf::util::Properties parseQuery( std::string query ); 00068 00078 static void parseQuery( std::string query, 00079 decaf::util::Properties* properties ); 00080 00093 static std::string createQueryString( const Properties& options ); 00094 00095 private: 00096 00107 static void parseComposite( const URI& uri, CompositeData& rc, const std::string& ssp ); 00108 00115 static decaf::util::LinkedList<std::string> splitComponents( const std::string& str ); 00116 00127 static std::string stripPrefix( const std::string& value, const std::string& prefix ); 00128 00136 static bool checkParenthesis( const std::string& str ); 00137 00147 static std::string replaceEnvValues( const std::string& value ); 00148 00149 }; 00150 00151 }} 00152 00153 #endif /*_ACTIVEMQ_UTIL_URISUPPORT_H_*/