1 #ifndef PROTON_CONTAINER_HPP
2 #define PROTON_CONTAINER_HPP
29 #include "./internal/export.hpp"
169 PN_CPP_EXTERN
void run(
int count);
266 PN_CPP_EXTERN std::string
id()
const;
309 PN_CPP_EXTERN PN_CPP_DEPRECATED(
"Use 'container::schedule(duration, work)'") void schedule(
duration dur, void_function0& fn);
314 PN_CPP_EXTERN
void schedule(
duration dur, internal::v03::work fn);
316 std::unique_ptr<impl> impl_;
Options for creating a connection.
Definition: connection_options.hpp:67
A top-level container of connections, sessions, and links.
Definition: container.hpp:49
connection_options server_connection_options() const
Connection options applied to incoming connections.
void run()
Run the container in the current thread.
returned< receiver > open_receiver(const std::string &addr_url)
Open a connection and receiver for addr_url.
void auto_stop(bool enabled)
Enable or disable automatic container stop.
returned< receiver > open_receiver(const std::string &addr_url, const proton::receiver_options &rcv_opts)
Open a connection and receiver for addr_url.
void receiver_options(const class receiver_options &rcv_opts)
Receiver options applied to receivers created by this container.
returned< connection > connect()
Connect using the default Connection Configuration file.
container(messaging_handler &handler)
Create a container with a global handler for messaging events.
returned< connection > connect(const std::string &conn_url)
Connect using the default Connection Configuration file.
std::string id() const
A unique identifier for the container.
void sender_options(const class sender_options &snd_opts)
Sender options applied to senders created by this container.
~container()
Destroy a container.
void server_connection_options(const connection_options &conn_opts)
Connection options applied to incoming connections.
returned< receiver > open_receiver(const std::string &addr_url, const proton::receiver_options &rcv_opts, const connection_options &conn_opts)
Open a connection and receiver for addr_url.
container(const std::string &id)
Create a container.
void stop()
Stop the container with an empty error condition.
connection_options client_connection_options() const
Connection options applied to outgoing connections.
void client_connection_options(const connection_options &conn_opts)
Connection options applied to outgoing connections.
container(messaging_handler &handler, const std::string &id)
Create a container with a global handler for messaging events.
listener listen(const std::string &listen_url, listen_handler &handler)
Listen for new connections on listen_url.
returned< receiver > open_receiver(const std::string &addr_url, const connection_options &conn_opts)
Open a connection and receiver for addr_url.
void schedule(duration dur, work fn)
Schedule fn for execution after a duration.
returned< sender > open_sender(const std::string &addr_url, const proton::sender_options &snd_opts, const connection_options &conn_opts)
Open a connection and sender for addr_url.
void run(int count)
Run the container with a pool of count threads, including the current thread.
returned< sender > open_sender(const std::string &addr_url, const connection_options &conn_opts)
Open a connection and sender for addr_url.
listener listen(const std::string &listen_url)
Listen for new connections on listen_url.
returned< connection > connect(const std::string &conn_url, const connection_options &conn_opts)
Connect to conn_url and send an open request to the remote peer.
void stop(const error_condition &err)
Stop the container with error condition err.
returned< sender > open_sender(const std::string &addr_url)
Open a connection and sender for addr_url.
listener listen(const std::string &listen_url, const connection_options &conn_opts)
Listen for new connections on listen_url.
returned< sender > open_sender(const std::string &addr_url, const proton::sender_options &snd_opts)
Open a connection and sender for addr_url.
container()
Create a container.
A span of time in milliseconds.
Definition: duration.hpp:39
Describes an endpoint error state.
Definition: error_condition.hpp:39
Unsettled API - A handler for incoming connections.
Definition: listen_handler.hpp:39
A listener for incoming connections.
Definition: listener.hpp:33
Handler for Proton messaging events.
Definition: messaging_handler.hpp:69
Options for creating a receiver.
Definition: receiver_options.hpp:59
A return type for container methods.
Definition: returned.hpp:51
Options for creating a sender.
Definition: sender_options.hpp:60
Options for creating a session.
Definition: session_options.hpp:41
Unsettled API - A context for thread-safe execution of work.
Definition: work_queue.hpp:327
The main Proton namespace.
Definition: annotation_key.hpp:33
A return type for container methods.
Forward declarations for Proton types used to represent AMQP types.