1 /* Icinga 2 | (c) 2012 Icinga GmbH | GPLv2+ */
3 #ifndef EXTERNALCOMMANDLISTENER_H
4 #define EXTERNALCOMMANDLISTENER_H
6 #include "compat/externalcommandlistener-ti.hpp"
7 #include "base/objectlock.hpp"
8 #include "base/timer.hpp"
9 #include "base/utility.hpp"
19 class ExternalCommandListener final : public ObjectImpl<ExternalCommandListener>
22 DECLARE_OBJECT(ExternalCommandListener);
23 DECLARE_OBJECTNAME(ExternalCommandListener);
25 static void StatsFunc(const Dictionary::Ptr& status, const Array::Ptr& perfdata);
28 void Start(bool runtimeCreated) override;
29 void Stop(bool runtimeRemoved) override;
33 std::thread m_CommandThread;
35 void CommandPipeThread(const String& commandPath);
41 #endif /* EXTERNALCOMMANDLISTENER_H */