RMQ - RabbitMQ C++ Library
rmqt_simpleendpoint.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_SIMPLEENDPOINT
17#define INCLUDED_RMQT_SIMPLEENDPOINT
18
19#include <rmqt_endpoint.h>
20
21#include <bsl_string.h>
22
23namespace BloombergLP {
24namespace rmqt {
25
30
31class SimpleEndpoint : public Endpoint {
32 public:
37 SimpleEndpoint(bsl::string_view address,
38 bsl::string_view vhost,
39 bsl::uint16_t port = 5672);
40
41 bsl::string formatAddress() const;
42 bsl::string hostname() const;
43 bsl::string vhost() const;
44 unsigned short port() const;
45
46 protected:
47 virtual bsl::string protocol() const;
48
49 private:
50 bsl::string d_address;
51 bsl::string d_vhost;
52 bsl::uint16_t d_port;
53};
54
55} // namespace rmqt
56} // namespace BloombergLP
57
58#endif
Base class for AMQP endpoint.
Definition: rmqt_endpoint.h:30
AMQP simple endpoint.
Definition: rmqt_simpleendpoint.h:31
SimpleEndpoint(bsl::string_view address, bsl::string_view vhost, bsl::uint16_t port=5672)
SimpleEndpoint constructor.
Definition: rmqt_simpleendpoint.cpp:21