Qpid Proton C++ API  0.17.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
sender_options Class Reference

Options for creating a sender. More...

#include <sender_options.hpp>

Public Member Functions

 sender_options ()
 Create an empty set of options.
 sender_options (const sender_options &)
 Copy options.
sender_optionsoperator= (const sender_options &)
 Copy options.
void update (const sender_options &other)
 Merge with another option set.
sender_optionshandler (class messaging_handler &)
 Set a messaging_handler for sender events only. More...
sender_optionsdelivery_mode (delivery_mode)
 Set the delivery mode on the sender.
sender_optionsauto_settle (bool)
 Automatically settle messages (default is true).
sender_optionssource (const source_options &)
 Options for the source node of the sender.
sender_optionstarget (const target_options &)
 Options for the receiver node of the receiver.

Detailed Description

Options for creating a sender.

Options can be "chained" like this:

l = container.create_sender(url, sender_options().handler(h).auto_settle(false));

You can also create an options object with common settings and use it as a base for different connections that have mostly the same settings:

l1 = container.open_sender(url1, opts.handler(h1));
c2 = container.open_receiver(url2, opts.handler(h2));

Normal value semantics: copy or assign creates a separate copy of the options.

broker.cpp, broker.hpp, mt/broker.cpp, server_direct.cpp, and service_bus.cpp.

Member Function Documentation

sender_options& handler ( class messaging_handler )

Set a messaging_handler for sender events only.

The handler is no longer in use when messaging_handler::on_sender_close() is called. messaging_handler::on_sender_close() may not be called if a connection is aborted, in that case it should be cleaned up in its connection's messaging_handler::on_transport_close()

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