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

Options for creating a receiver. More...

#include <receiver_options.hpp>

Public Member Functions

 receiver_options ()
 Create an empty set of options.
 
 receiver_options (const receiver_options &)
 Copy options.
 
receiver_optionsoperator= (const receiver_options &)
 Copy options.
 
void update (const receiver_options &other)
 Merge with another option set.
 
receiver_optionshandler (class messaging_handler &)
 Set a messaging_handler for receiver events only. More...
 
receiver_optionsdelivery_mode (delivery_mode)
 Set the delivery mode on the receiver.
 
receiver_optionsauto_accept (bool)
 Automatically accept inbound messages that aren't otherwise released, rejected, or modified (default is true). More...
 
receiver_optionsauto_settle (bool)
 Automatically settle messages (default is true).
 
receiver_optionssource (source_options &)
 Options for the source node of the receiver.
 
receiver_optionstarget (target_options &)
 Options for the target node of the receiver.
 
receiver_optionscredit_window (int)
 Set automated flow control to pre-fetch this many messages (default is 10). More...
 

Detailed Description

Options for creating a receiver.

Options can be "chained" like this:

l = container.create_receiver(url, receiver_options().handler(h).auto_settle(true));

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:

opts.auto_settle(true);
c2 = container.open_receiver(url2, opts.handler(h2));

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

Examples:
broker.cpp, broker.hpp, client.cpp, and service_bus.cpp.

Member Function Documentation

receiver_options& auto_accept ( bool  )

Automatically accept inbound messages that aren't otherwise released, rejected, or modified (default is true).

receiver_options& credit_window ( int  )

Set automated flow control to pre-fetch this many messages (default is 10).

Set to zero to disable automatic credit replenishing.

receiver_options& handler ( class messaging_handler )

Set a messaging_handler for receiver events only.

The handler is no longer in use when messaging_handler::on_receiver_close() is called.


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