Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
Classes | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
qpid::Url Struct Reference

An AMQP URL contains a list of addresses. More...

#include <qpid/Url.h>

Classes

struct  Invalid
 

Public Member Functions

std::string str () const
 Convert to string form. More...
 
 Url ()
 Empty URL. More...
 
 Url (const Address &addr)
 URL containing a single address. More...
 
 Url (const std::string &url)
 Parse url, throw Invalid if invalid. More...
 
 Url (const std::string &url, const std::string &defaultProtocol)
 Parse url, throw Invalid if invalid. More...
 
 Url (const char *url)
 Parse url, throw Invalid if invalid. More...
 
Urloperator= (const char *s)
 
Urloperator= (const std::string &s)
 
void throwIfEmpty () const
 Throw Invalid if the URL does not contain any addresses. More...
 
void parse (const char *url)
 Replace contents with parsed url

Exceptions
Invalidif the url is invalid.
More...
 
void parse (const char *url, const std::string &defaultProtocol)
 
QPID_COMMON_INLINE_EXTERN void parse (const std::string &url)
 
void parseNoThrow (const char *url)
 Replace contesnts with parsed URL. More...
 
void parseNoThrow (const char *url, const std::string &defaultProtocol)
 
void setUser (const std::string &)
 
void setPass (const std::string &)
 
std::string getUser () const
 
std::string getPass () const
 

Static Public Member Functions

static Url getHostNameUrl (uint16_t port)
 Url with the hostname as returned by gethostname(2) More...
 
static Url getIpAddressesUrl (uint16_t port)
 Url with local IP address(es), may be more than one address on a multi-homed host. More...
 
static void addProtocol (const std::string &tag)
 Add a protocol tag to be recognzed in URLs. More...
 

Public Attributes

elements
 STL member. More...
 

Detailed Description

An AMQP URL contains a list of addresses.

Definition at line 33 of file Url.h.

Constructor & Destructor Documentation

qpid::Url::Url ( )
inline

Empty URL.

Definition at line 48 of file Url.h.

qpid::Url::Url ( const Address addr)
inlineexplicit

URL containing a single address.

Definition at line 51 of file Url.h.

qpid::Url::Url ( const std::string &  url)
inlineexplicit

Parse url, throw Invalid if invalid.

Definition at line 54 of file Url.h.

References parse().

qpid::Url::Url ( const std::string &  url,
const std::string &  defaultProtocol 
)
inlineexplicit

Parse url, throw Invalid if invalid.

Definition at line 56 of file Url.h.

References parse().

qpid::Url::Url ( const char *  url)
inlineexplicit

Parse url, throw Invalid if invalid.

Definition at line 59 of file Url.h.

References parse().

Member Function Documentation

static void qpid::Url::addProtocol ( const std::string &  tag)
static

Add a protocol tag to be recognzed in URLs.

Only for use by protcol plug-in initializers.

static Url qpid::Url::getHostNameUrl ( uint16_t  port)
static

Url with the hostname as returned by gethostname(2)

static Url qpid::Url::getIpAddressesUrl ( uint16_t  port)
static

Url with local IP address(es), may be more than one address on a multi-homed host.

std::string qpid::Url::getPass ( ) const
std::string qpid::Url::getUser ( ) const
Url& qpid::Url::operator= ( const char *  s)
inline

Definition at line 61 of file Url.h.

References parse().

Url& qpid::Url::operator= ( const std::string &  s)
inline

Definition at line 62 of file Url.h.

References parse().

void qpid::Url::parse ( const char *  url)

Replace contents with parsed url

Exceptions
Invalidif the url is invalid.

Referenced by operator=(), and Url().

void qpid::Url::parse ( const char *  url,
const std::string &  defaultProtocol 
)
QPID_COMMON_INLINE_EXTERN void qpid::Url::parse ( const std::string &  url)
inline

Definition at line 72 of file Url.h.

References parse().

Referenced by parse().

void qpid::Url::parseNoThrow ( const char *  url)

Replace contesnts with parsed URL.

Replace with empty URL if invalid.

void qpid::Url::parseNoThrow ( const char *  url,
const std::string &  defaultProtocol 
)
void qpid::Url::setPass ( const std::string &  )
void qpid::Url::setUser ( const std::string &  )
std::string qpid::Url::str ( ) const

Convert to string form.

Referenced by qpid::operator!=(), and qpid::operator==().

void qpid::Url::throwIfEmpty ( ) const

Throw Invalid if the URL does not contain any addresses.

Member Data Documentation

T std::vector< T >::elements
inherited

STL member.


The documentation for this struct was generated from the following file:

Qpid C++ API Reference
Generated on Tue Mar 26 2013 for Qpid C++ Client API by doxygen 1.8.3.1