receiver_options.hpp
Go to the documentation of this file.
#ifndef PROTON_RECEIVER_OPTIONS_HPP
#define PROTON_RECEIVER_OPTIONS_HPP
/*
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
*/
#include "./fwd.hpp"
#include "./internal/export.hpp"
#include "./internal/pn_unique_ptr.hpp"
#include "./delivery_mode.hpp"
#include <string>
namespace proton {
class receiver_options {
public:
PN_CPP_EXTERN receiver_options();
PN_CPP_EXTERN receiver_options(const receiver_options&);
PN_CPP_EXTERN ~receiver_options();
PN_CPP_EXTERN receiver_options& operator=(const receiver_options&);
PN_CPP_EXTERN void update(const receiver_options& other);
PN_CPP_EXTERN receiver_options& handler(class messaging_handler&);
PN_CPP_EXTERN receiver_options& delivery_mode(delivery_mode);
PN_CPP_EXTERN receiver_options& auto_accept(bool);
PN_CPP_EXTERN receiver_options& auto_settle(bool);
PN_CPP_EXTERN receiver_options& source(source_options&);
PN_CPP_EXTERN receiver_options& target(target_options&);
PN_CPP_EXTERN receiver_options& credit_window(int count);
PN_CPP_EXTERN receiver_options& name(const std::string& name);
private:
void apply(receiver &) const;
const std::string* get_name() const; // Pointer to name if set, else 0
class impl;
internal::pn_unique_ptr<impl> impl_;
friend class receiver;
friend class session;
};
} // proton
#endif // PROTON_RECEIVER_OPTIONS_HPP
proton::messaging_handler
A handler for Proton messaging events.
Definition: messaging_handler.hpp:63
proton::receiver_options
Options for creating a receiver.
Definition: receiver_options.hpp:56
proton::receiver_options::name
receiver_options & name(const std::string &name)
Set the link name. If not set a unique name is generated.
proton::receiver_options::receiver_options
receiver_options(const receiver_options &)
Copy options.
proton::receiver_options::delivery_mode
receiver_options & delivery_mode(delivery_mode)
Set the delivery mode on the receiver.
proton::receiver_options::credit_window
receiver_options & credit_window(int count)
Automatically replenish credit for flow control up to count messages.
proton::receiver_options::target
receiver_options & target(target_options &)
Options for the target node of the receiver.
proton::receiver_options::update
void update(const receiver_options &other)
Merge with another option set.
proton::receiver_options::source
receiver_options & source(source_options &)
Options for the source node of the receiver.
proton::receiver_options::operator=
receiver_options & operator=(const receiver_options &)
Copy options.
proton::receiver_options::handler
receiver_options & handler(class messaging_handler &)
Set a messaging_handler for receiver events only.
proton::receiver_options::auto_accept
receiver_options & auto_accept(bool)
Enable or disable automatic acceptance of messages that aren't otherwise released,...
proton::receiver_options::receiver_options
receiver_options()
Create an empty set of options.
proton::receiver_options::auto_settle
receiver_options & auto_settle(bool)
proton::receiver
A channel for receiving messages.
Definition: receiver.hpp:41
proton::session
A container of senders and receivers.
Definition: session.hpp:42
proton::source_options
Options for creating a source node for a sender or receiver.
Definition: source_options.hpp:44
proton::target_options
Options for creating a target node for a sender or receiver.
Definition: target_options.hpp:44
delivery_mode.hpp
The message delivery policy to establish when opening a link.
fwd.hpp
Forward declarations.
proton
The main Proton namespace.
Definition: annotation_key.hpp:33
proton::delivery_mode
The message delivery policy to establish when opening a link.
Definition: delivery_mode.hpp:33