RMQ - RabbitMQ C++ Library
rmqt_binding.h
1// Copyright 2020-2023 Bloomberg Finance L.P.
2// SPDX-License-Identifier: Apache-2.0
3//
4// Licensed under the Apache License, Version 2.0 (the "License");
5// you may not use this file except in compliance with the License.
6// You may obtain a copy of the License at
7//
8// http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13// See the License for the specific language governing permissions and
14// limitations under the License.
15
16#ifndef INCLUDED_RMQT_BINDING
17#define INCLUDED_RMQT_BINDING
18
19#include <rmqt_fieldvalue.h>
20
21#include <bsl_string.h>
22
23namespace BloombergLP {
24namespace rmqt {
25
30
31class Binding {
32 protected:
36 explicit Binding(const bsl::string& bindingKey,
37 const rmqt::FieldTable& args = rmqt::FieldTable())
38 : d_bindingKey(bindingKey)
39 , d_args(args)
40 {
41 }
42
43 public:
44 const bsl::string& bindingKey() const { return d_bindingKey; }
45 const rmqt::FieldTable& args() const { return d_args; }
46
47 private:
48 bsl::string d_bindingKey;
49 rmqt::FieldTable d_args;
50};
51
52} // namespace rmqt
53} // namespace BloombergLP
54#endif
An AMQP binding.
Definition: rmqt_binding.h:31
Binding(const bsl::string &bindingKey, const rmqt::FieldTable &args=rmqt::FieldTable())
Constructor.
Definition: rmqt_binding.h:36
Represents AMQP 0.9.1 Field Table (dict of FieldValues)
Definition: rmqt_fieldvalue.h:108