libbmq
a5f8a06ba1d16cb5a65643e1fa7f1a1d6aadef40
|
Provide value-semantic type and utilities for a BlazingMQ queue URI. More...
#include <ball_log.h>
#include <bsl_cstddef.h>
#include <bsl_iosfwd.h>
#include <bsl_string.h>
#include <bslh_hash.h>
#include <bslma_usesbslmaallocator.h>
#include <bslmf_nestedtraitdeclaration.h>
Go to the source code of this file.
Classes | |
class | BloombergLP::bmqt::Uri |
Value semantic type representing a URI. More... | |
struct | BloombergLP::bmqt::UriParser |
Utility namespace of methods for parsing URI strings into Uri objects. More... | |
class | BloombergLP::bmqt::UriBuilder |
Namespaces | |
BloombergLP | |
BloombergLP::bmqt | |
Functions | |
bool | BloombergLP::bmqt::operator== (const Uri &lhs, const Uri &rhs) |
bool | BloombergLP::bmqt::operator!= (const Uri &lhs, const Uri &rhs) |
bool | BloombergLP::bmqt::operator< (const Uri &lhs, const Uri &rhs) |
bsl::ostream & | BloombergLP::bmqt::operator<< (bsl::ostream &stream, const Uri &rhs) |
template<class HASH_ALGORITHM > | |
void | BloombergLP::bmqt::hashAppend (HASH_ALGORITHM &hashAlgo, const Uri &uri) |
This component provides a value-semantic type, bmqt::Uri representing a URI for a BlazingMQ queue. A bmqt::Uri can be built by parsing from a string representation, using the bmqt::UriParser, or built using the bmqt::UriBuilder.
In a nutshell, a URI representing an application queue managed by a BlazingMQ broker on a given machine looks like one of the following:
where:
[-a-zA-Z0-9\\._]+
). The domain may be followed by an optional tier, introduced by the ".~" sequence and consisting of alphanumeric characters and dashes. The ".~" sequence is not part of the tier.[-a-zA-Z0-9_~\\.]+
). The queue name must be less than bmqt::Uri::k_QUEUENAME_MAX_LENGTH characters long.First, call the initialize
method of the bmqt::UriParser. This call is only needed one time; you can call it when your task starts.
Note that the bmq
library takes care of that, so users of bmq
don't have to explicitly do it themselves.
Then, parse a URI string created on the stack to populate a bmqt::Uri object. The parse function takes an optional error string which is populated with a short error message if the URI is not formatted correctly.
Instantiate a bmqt::Uri object with a string representation of the URI and an allocator.
bdepcre_regex
that is a wrapper around "pcre.h". See http://www.pcre.org/pcre.txt.