source_options.hpp
Go to the documentation of this file.
#ifndef PROTON_SOURCE_OPTIONS_HPP
#define PROTON_SOURCE_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 "./internal/export.hpp"
#include "./internal/pn_unique_ptr.hpp"
#include "./duration.hpp"
#include "./source.hpp"
#include <string>
namespace proton {
class source_options {
public:
PN_CPP_EXTERN source_options();
PN_CPP_EXTERN source_options(const source_options&);
PN_CPP_EXTERN ~source_options();
PN_CPP_EXTERN source_options& operator=(const source_options&);
PN_CPP_EXTERN source_options& address(const std::string&);
PN_CPP_EXTERN source_options& dynamic(bool);
PN_CPP_EXTERN source_options& distribution_mode(enum source::distribution_mode);
PN_CPP_EXTERN source_options& durability_mode(enum source::durability_mode);
PN_CPP_EXTERN source_options& timeout(duration);
PN_CPP_EXTERN source_options& expiry_policy(enum source::expiry_policy);
PN_CPP_EXTERN source_options& filters(const source::filter_map&);
PN_CPP_EXTERN source_options& capabilities(const std::vector<symbol>&);
private:
void apply(source&) const;
class impl;
internal::pn_unique_ptr<impl> impl_;
friend class source;
friend class sender_options;
friend class receiver_options;
};
} // proton
#endif // PROTON_SOURCE_OPTIONS_HPP
source.hpp
proton::source
A point of origin for messages.
Definition: source.hpp:44
proton::source::durability_mode
durability_mode
The persistence mode of the source or target.
Definition: terminus.hpp:60
proton::source::expiry_policy
expiry_policy
When expiration of the source or target begins.
Definition: terminus.hpp:70
proton::source_options
Options for creating a source node for a sender or receiver.
Definition: source_options.hpp:44
proton::source_options::capabilities
source_options & capabilities(const std::vector< symbol > &)
Extension capabilities that are supported/requested.
proton::source_options::address
source_options & address(const std::string &)
Set the address for the source.
proton::receiver_options
Options for creating a receiver.
Definition: receiver_options.hpp:56
proton::source_options::dynamic
source_options & dynamic(bool)
Request that a node be dynamically created by the remote peer.
proton::map< symbol, value >
proton::duration
A span of time in milliseconds.
Definition: duration.hpp:39
proton::source_options::timeout
source_options & timeout(duration)
The expiry period after which the source is discarded.
proton::source_options::distribution_mode
source_options & distribution_mode(enum source::distribution_mode)
Control whether messages are browsed or consumed.
proton::source_options::durability_mode
source_options & durability_mode(enum source::durability_mode)
Control the persistence of the source node.
proton::sender_options
Options for creating a sender.
Definition: sender_options.hpp:57
proton::source_options::filters
source_options & filters(const source::filter_map &)
Unsettled API - Specify a filter mechanism on the source that restricts message flow to a subset of t...
proton::source_options::source_options
source_options()
Create an empty set of options.
proton::source::distribution_mode
distribution_mode
The policy for distributing messages.
Definition: source.hpp:54
proton
The main Proton namespace.
Definition: annotation_key.hpp:33
proton::source_options::operator=
source_options & operator=(const source_options &)
Copy options.
duration.hpp
proton::source_options::expiry_policy
source_options & expiry_policy(enum source::expiry_policy)
Control when the clock for expiration begins.