1 #ifndef PROTON_CPP_CONTAINER_H
2 #define PROTON_CPP_CONTAINER_H
25 #include "proton/duration.hpp"
26 #include "proton/export.hpp"
27 #include "proton/pn_unique_ptr.hpp"
28 #include "proton/reactor.hpp"
29 #include "proton/url.hpp"
30 #include "proton/connection_options.hpp"
31 #include "proton/link_options.hpp"
63 PN_CPP_EXTERN
container(
const std::string&
id=
"");
69 PN_CPP_EXTERN
container(
handler& mhandler,
const std::string&
id=std::string());
71 PN_CPP_EXTERN ~container();
83 PN_CPP_EXTERN
void run();
100 PN_CPP_EXTERN std::string
id()
const;
106 PN_CPP_EXTERN
class reactor reactor() const;
110 PN_CPP_EXTERN task schedule(
int delay,
handler *h = 0);
132 pn_unique_ptr<container_impl> impl_;
135 friend class connector;
142 #endif // PROTON_CPP_CONTAINER_H
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().
A top-level container of connections, sessions, and links.
Definition: container.hpp:57
A context for accepting inbound connections.
Definition: acceptor.hpp:36
void server_connection_options(const connection_options &)
Copy the connection options to a template which will be applied to incoming connections.
A link for sending messages.
Definition: sender.hpp:38
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().
acceptor listen(const proton::url &, const connection_options &opts=connection_options())
Listen on url for incoming connections.
A named channel for sending or receiving messages.
Definition: link.hpp:43
A connection to a remote AMQP peer.
Definition: connection.hpp:42
Options for creating a connection.
Definition: connection_options.hpp:60
void client_connection_options(const connection_options &)
Copy the connection options to a template which will be applied to subsequent outgoing connections...
A proton URL.
Definition: url.hpp:51
Callback functions for handling proton events.
Definition: handler.hpp:40
std::string id() const
A unique identifier for the container.
connection connect(const proton::url &, const connection_options &opts=connection_options())
Open a connection to url.
Options for creating a link.
Definition: link_options.hpp:60
A link for receiving messages.
Definition: receiver.hpp:36
void run()
Start processing events.
void link_options(const link_options &)
Copy the link options to a template applied to new links created and opened by this container...
container(const std::string &id="")
Create a container.