Qpid Proton C++
0.12.1
|
A top-level container of connections, sessions, and links. More...
#include <container.hpp>
Public Member Functions | |
container (const std::string &id="") | |
Create a container. More... | |
container (handler &mhandler, const std::string &id=std::string()) | |
Create a container with an event handler. More... | |
connection | connect (const proton::url &, const connection_options &opts=connection_options()) |
Open a connection to url . | |
acceptor | listen (const proton::url &, const connection_options &opts=connection_options()) |
Listen on url for incoming connections. | |
void | run () |
Start processing events. More... | |
sender | open_sender (const proton::url &, const proton::link_options &l=proton::link_options(), const connection_options &c=connection_options()) |
Open a connection to url and open a sender for url.path() . More... | |
receiver | open_receiver (const url &, const proton::link_options &l=proton::link_options(), const connection_options &c=connection_options()) |
Open a connection to url and open a receiver for url.path() . More... | |
std::string | id () const |
A unique identifier for the container. | |
void | client_connection_options (const connection_options &) |
Copy the connection options to a template which will be applied to subsequent outgoing connections. More... | |
void | server_connection_options (const connection_options &) |
Copy the connection options to a template which will be applied to incoming connections. More... | |
void | link_options (const link_options &) |
Copy the link options to a template applied to new links created and opened by this container. More... | |
A top-level container of connections, sessions, and links.
A container gives a unique identity to each communicating peer. It is often a process-level object. It serves as an entry point to the API, allowing connections and links to be established. It can be supplied with an event handler in order to intercept important messaging events, such as newly received messages or newly issued link credit for sending messages.
container | ( | const std::string & | id = "" | ) |
Create a container.
Container ID should be unique within your system. By default a random ID is generated.
Create a container with an event handler.
Container ID should be unique within your system. By default a random ID is generated.
void client_connection_options | ( | const connection_options & | ) |
Copy the connection options to a template which will be applied to subsequent outgoing connections.
These are applied first and overriden by additional connection options provided in other methods.
void link_options | ( | const link_options & | ) |
Copy the link options to a template applied to new links created and opened by this container.
They are applied before the open event on the link and may be overriden by link options in other methods.
receiver open_receiver | ( | const url & | , |
const proton::link_options & | l = proton::link_options() , |
||
const connection_options & | c = connection_options() |
||
) |
Open a connection to url
and open a receiver for url.path()
.
Any supplied link or connection options will override the container's template options.
sender open_sender | ( | const proton::url & | , |
const proton::link_options & | l = proton::link_options() , |
||
const connection_options & | c = connection_options() |
||
) |
Open a connection to url
and open a sender for url.path()
.
Any supplied link or connection options will override the container's template options.
void run | ( | ) |
Start processing events.
It returns when all connections and acceptors are closed.
void server_connection_options | ( | const connection_options & | ) |
Copy the connection options to a template which will be applied to incoming connections.
These are applied before the first open event on the connection.