activemq-cpp-3.9.5
URISupport.h
Go to the documentation of this file.
1 /*
2  * Licensed to the Apache Software Foundation (ASF) under one or more
3  * contributor license agreements. See the NOTICE file distributed with
4  * this work for additional information regarding copyright ownership.
5  * The ASF licenses this file to You under the Apache License, Version 2.0
6  * (the "License"); you may not use this file except in compliance with
7  * the License. You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17 
18 #ifndef _ACTIVEMQ_UTIL_URISUPPORT_H_
19 #define _ACTIVEMQ_UTIL_URISUPPORT_H_
20 
21 #include <activemq/util/Config.h>
23 #include <decaf/util/Properties.h>
24 #include <decaf/util/LinkedList.h>
26 
27 namespace activemq {
28 namespace util {
29 
31  public:
32 
41  static bool isCompositeURI(const decaf::net::URI& uri);
42 
50  static void parseURL(const std::string& URI, decaf::util::Properties& properties);
51 
62  static CompositeData parseComposite(const URI& uri);
63 
76  static decaf::util::Properties parseQuery(std::string query);
77 
87  static void parseQuery(std::string query, decaf::util::Properties* properties);
88 
101  static std::string createQueryString(const Properties& options);
102 
116  static decaf::util::Properties parseParameters(const decaf::net::URI& uri);
117 
132  static decaf::net::URI applyParameters(const decaf::net::URI& uri, const decaf::util::Properties& queryParameters);
133 
151  static decaf::net::URI applyParameters(const decaf::net::URI& uri,
152  const decaf::util::Properties& queryParameters,
153  const std::string& optionPrefix);
154 
167  static decaf::net::URI createURIWithQuery(const decaf::net::URI& uri, const std::string& query);
168 
169  public: // Utility methods used by this class.
170 
181  static void parseComposite(const URI& uri, CompositeData& rc, const std::string& ssp);
182 
189  static decaf::util::LinkedList<std::string> splitComponents(const std::string& str);
190 
200  static decaf::net::URI stripScheme(const decaf::net::URI& uri);
201 
212  static std::string stripPrefix(const std::string& value, const std::string& prefix);
213 
221  static bool checkParenthesis(const std::string& str);
222 
232  static std::string replaceEnvValues(const std::string& value);
233 
234  };
235 
236 }}
237 
238 #endif /*_ACTIVEMQ_UTIL_URISUPPORT_H_*/
Definition: URISupport.h:30
#define AMQCPP_API
Definition: Config.h:30
Represents a Composite URI.
Definition: CompositeData.h:39
This class represents an instance of a URI as defined by RFC 2396.
Definition: URI.h:37
Java-like properties class for mapping string names to string values.
Definition: Properties.h:53
A complete implementation of the List interface using a doubly linked list data structure.
Definition: LinkedList.h:55