libbmq  a5f8a06ba1d16cb5a65643e1fa7f1a1d6aadef40
bmqpi_hosthealthmonitor.h
Go to the documentation of this file.
1 // Copyright 2021-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 // bmqpi_hosthealthmonitor.h -*-C++-*-
17 #ifndef INCLUDED_BMQPI_HOSTHEALTHMONITOR
18 #define INCLUDED_BMQPI_HOSTHEALTHMONITOR
19 
27 
28 // BMQ
29 
30 #include <bmqt_hosthealthstate.h>
31 
32 // BDE
33 #include <bdlmt_signaler.h>
34 #include <bsl_functional.h>
35 
36 namespace BloombergLP {
37 namespace bmqpi {
38 
39 // =======================
40 // class HostHealthMonitor
41 // =======================
42 
45  public:
46  // TYPES
47 
50  typedef bsl::function<void(bmqt::HostHealthState::Enum)>
52 
53  public:
54  // CREATORS
55 
57  virtual ~HostHealthMonitor();
58 
59  // MANIPULATORS
60 
63  virtual bdlmt::SignalerConnection
65 
66  // ACCESSORS
67 
70 };
71 
72 } // close package namespace
73 } // close enterprise namespace
74 
75 #endif
Provide an enumeration for different host health states.
A pure interface for monitoring the health of the host.
Definition: bmqpi_hosthealthmonitor.h:44
virtual bdlmt::SignalerConnection observeHostHealth(const HostHealthChangeFn &cb)=0
bsl::function< void(bmqt::HostHealthState::Enum)> HostHealthChangeFn
Definition: bmqpi_hosthealthmonitor.h:51
virtual ~HostHealthMonitor()
Destructor.
virtual bmqt::HostHealthState::Enum hostState() const =0
Queries the current health of the host.
Definition: bmqa_abstractsession.h:42
Enum
Definition: bmqt_hosthealthstate.h:47