Qpid Proton C++  0.12.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Pages
Public Member Functions | Static Public Attributes | List of all members
url Class Reference

A proton URL. More...

#include <url.hpp>

Public Member Functions

 url ()
 Create an empty URL.
 
 url (const std::string &url_str, bool defaults=true)
 Parse url_str as an AMQP URL. More...
 
 url (const char *url_str, bool defaults=true)
 Parse url_str as an AMQP URL. More...
 
 url (const url &)
 Copy a URL.
 
urloperator= (const url &)
 Copy a URL.
 
void parse (const std::string &)
 Parse a string as a URL. More...
 
void parse (const char *)
 Parse a string as a URL. More...
 
bool empty () const
 True if the URL is empty.
 
std::string str () const
 str returns the URL as a string
 
URL fields
std::string scheme () const
 
void scheme (const std::string &)
 
std::string password () const
 
void password (const std::string &)
 
std::string host () const
 
void host (const std::string &)
 
void port (const std::string &)
 port can be a number or a symbolic name such as "amqp".
 
std::string port () const
 
uint16_t port_int () const
 port_int is the numeric value of the port.
 
std::string host_port () const
 host_port returns just the host:port part of the URL
 
std::string path () const
 path is everything after the final "/".
 
void path (const std::string &)
 

Static Public Attributes

static const std::string AMQP
 "amqp" prefix
 
static const std::string AMQPS
 "amqps" prefix
 

Detailed Description

A proton URL.

Proton URLs take the form <scheme>://<username>:<password>@<host>:<port>/<path>.

Examples:
broker.cpp, client.cpp, direct_recv.cpp, direct_send.cpp, engine/broker.cpp, engine/client.cpp, engine/direct_recv.cpp, engine/direct_send.cpp, engine/helloworld.cpp, engine/server.cpp, engine/simple_recv.cpp, engine/simple_send.cpp, helloworld.cpp, helloworld_direct.cpp, server.cpp, server_direct.cpp, simple_recv.cpp, and simple_send.cpp.

Constructor & Destructor Documentation

url ( const std::string &  url_str,
bool  defaults = true 
)

Parse url_str as an AMQP URL.

If defaults is true, fill in defaults for missing values otherwise return an empty string for missing values.

Note
Converts automatically from string.
Exceptions
url_errorif URL is invalid.
url ( const char *  url_str,
bool  defaults = true 
)

Parse url_str as an AMQP URL.

If defaults is true, fill in defaults for missing values otherwise return an empty string for missing values.

Note
Converts automatically from string.
Exceptions
url_errorif URL is invalid.

Member Function Documentation

void parse ( const std::string &  )

Parse a string as a URL.

Exceptions
url_errorif URL is invalid.
void parse ( const char *  )

Parse a string as a URL.

Exceptions
url_errorif URL is invalid.

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