activemq-cpp-3.9.0
|
#include <src/main/activemq/util/URISupport.h>
Static Public Member Functions | |
static bool | isCompositeURI (const decaf::net::URI &uri) |
Examine a URI and determine if it is a Composite type or not. More... | |
static void | parseURL (const std::string &URI, decaf::util::Properties &properties) |
Parses the properties out of the provided Broker URI and sets them in the passed Properties Object. More... | |
static CompositeData | parseComposite (const URI &uri) |
Parses a Composite URI into a Composite Data instance, the Composite URI takes the for scheme://(uri1,uri2,...uriN)?param1=value1, each of the composite URIs is stored in the CompositeData's internal list. More... | |
static decaf::util::Properties | parseQuery (std::string query) |
Parse the Query portion of a URI String and return a Simple Properties object containing the parameter names as keys, and the parameter values and values of the Properties. More... | |
static void | parseQuery (std::string query, decaf::util::Properties *properties) |
Parse the Query portion of a URI String and return a Simple Properties object containing the parameter names as keys, and the parameter values and values of the Properties. More... | |
static std::string | createQueryString (const Properties &options) |
Given a properties object create a string that can be appended to a URI as a valid Query string. More... | |
static decaf::util::Properties | parseParameters (const decaf::net::URI &uri) |
Given a URI parse and extract any URI query options and return them as a Key / Value mapping. More... | |
static decaf::net::URI | applyParameters (const decaf::net::URI &uri, const decaf::util::Properties &queryParameters) |
Given a Key / Value mapping create and append a URI query value that represents the mapped entries, return the newly updated URI that contains the value of the given URI and the appended query value. More... | |
static decaf::net::URI | applyParameters (const decaf::net::URI &uri, const decaf::util::Properties &queryParameters, const std::string &optionPrefix) |
Given a Key / Value mapping create and append a URI query value that represents the mapped entries, return the newly updated URI that contains the value of the given URI and the appended query value. More... | |
static decaf::net::URI | createURIWithQuery (const decaf::net::URI &uri, const std::string &query) |
Creates a URI with the given query, removing an previous query value from the given URI. More... | |
static void | parseComposite (const URI &uri, CompositeData &rc, const std::string &ssp) |
Perform a parse on the given composite URI, placing the results in the passed CompositeData. More... | |
static decaf::util::LinkedList < std::string > | splitComponents (const std::string &str) |
Splits all the Component URIs in a Composite URI into individual strings which can then be parsed separately and stored in a Composite Data object. More... | |
static decaf::net::URI | stripScheme (const decaf::net::URI &uri) |
Strip a URI of its scheme element. More... | |
static std::string | stripPrefix (const std::string &value, const std::string &prefix) |
Given a string value and a prefix value, return a new string that has the prefix removed if it was part of the passed in string, otherwise just return the passed in string. More... | |
static bool | checkParenthesis (const std::string &str) |
Matches all opening and closing parenthesis in a String. More... | |
static std::string | replaceEnvValues (const std::string &value) |
Accepts a string value and checks to see if that value is of the form ${XXX} which is our accepted form for environment variables. More... | |
|
static |
Given a Key / Value mapping create and append a URI query value that represents the mapped entries, return the newly updated URI that contains the value of the given URI and the appended query value.
uri | The source URI that will have the Map entries appended as a URI query value. |
queryParameters | The Key / Value mapping that will be transformed into a URI query string. |
URISyntaxException | if an invalid URI is created during this operation. |
|
static |
Given a Key / Value mapping create and append a URI query value that represents the mapped entries, return the newly updated URI that contains the value of the given URI and the appended query value.
Each entry in the query string is prefixed by the supplied optionPrefix string.
uri | The source URI that will have the Map entries appended as a URI query value. |
queryParameters | The Key / Value mapping that will be transformed into a URI query string. |
optionPrefix | A string value that when not null or empty is used to prefix each query option key. |
URISyntaxException | if an invalid URI is created during this operation. |
|
static |
Matches all opening and closing parenthesis in a String.
str | - The String to match parenthesis in. |
|
static |
Given a properties object create a string that can be appended to a URI as a valid Query string.
options | Properties object containing key / value query values. |
URISyntaxException | if the string in the Properties object can't be encoded into a valid URI Query string. |
|
static |
Creates a URI with the given query, removing an previous query value from the given URI.
uri | The source URI whose existing query is replaced with the newly supplied one. |
query | The new URI query string that should be appended to the given URI. |
URISyntaxException |
|
static |
Examine a URI and determine if it is a Composite type or not.
uri | The URI that is to be examined. |
|
static |
Parses a Composite URI into a Composite Data instance, the Composite URI takes the for scheme://(uri1,uri2,...uriN)?param1=value1, each of the composite URIs is stored in the CompositeData's internal list.
uri | - The Composite URI to parse. |
URISyntaxException | if the URI is not well formed. |
|
static |
Perform a parse on the given composite URI, placing the results in the passed CompositeData.
uri | - The URI to parse |
rc | - The CompositeData object to Populate |
ssp | - the Scheme Specific Part from the original URI. |
URISyntaxException | if the URI is not well formed. |
|
static |
Given a URI parse and extract any URI query options and return them as a Key / Value mapping.
This method differs from the parseQuery method in that it handles composite URI types and will extract the URI options from the outermost composite URI.
uri | The URI whose query should be extracted and processed. |
URISyntaxException | if the passed in URI contains invalid elements. |
|
static |
Parse the Query portion of a URI String and return a Simple Properties object containing the parameter names as keys, and the parameter values and values of the Properties.
query | The query string to parse and extract the encoded properties. |
IllegalArgumentException | if the Query string is not well formed. |
|
static |
Parse the Query portion of a URI String and return a Simple Properties object containing the parameter names as keys, and the parameter values and values of the Properties.
query | - the query string to parse. |
properties | - object pointer to get the parsed output. |
IllegalArgumentException | if the Query string is not well formed. |
|
static |
Parses the properties out of the provided Broker URI and sets them in the passed Properties Object.
URI | a Broker URI to parse |
properties | a Properties object to set the parsed values in |
IllegalArgumentException | if the passed URI is invalid |
|
static |
Accepts a string value and checks to see if that value is of the form ${XXX} which is our accepted form for environment variables.
If so the we attempt to replace the value with what is stored in that env var, if the var is not set then we throw an IllegalArgumentException.
value | - the value to check for env |
IllegalArgumentException | if the var is not set or has bad syntax |
|
static |
Splits all the Component URIs in a Composite URI into individual strings which can then be parsed separately and stored in a Composite Data object.
str | - the set of Composite URIs |
|
static |
Given a string value and a prefix value, return a new string that has the prefix removed if it was part of the passed in string, otherwise just return the passed in string.
value | - String to strip |
prefix | - value to strip from the passed in string |
|
static |
Strip a URI of its scheme element.
uri | The URI whose scheme value should be stripped. |
URISyntaxException |