2012-06-13 13:42:55 +02:00
|
|
|
#ifndef NAGIOSCHECKTASK_H
|
|
|
|
#define NAGIOSCHECKTASK_H
|
|
|
|
|
|
|
|
namespace icinga
|
|
|
|
{
|
|
|
|
|
2012-06-14 11:18:20 +02:00
|
|
|
class I2_ICINGA_API NagiosCheckTask : public CheckTask
|
2012-06-13 13:42:55 +02:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
NagiosCheckTask(const Service& service);
|
|
|
|
|
2012-06-17 20:35:56 +02:00
|
|
|
virtual void Execute(void);
|
|
|
|
virtual bool IsFinished(void) const;
|
|
|
|
virtual CheckResult GetResult(void);
|
2012-06-13 13:42:55 +02:00
|
|
|
|
|
|
|
static CheckTask::Ptr CreateTask(const Service& service);
|
|
|
|
|
|
|
|
private:
|
|
|
|
string m_Command;
|
2012-06-17 20:35:56 +02:00
|
|
|
packaged_task<CheckResult> m_Task;
|
|
|
|
unique_future<CheckResult> m_Result;
|
|
|
|
|
|
|
|
void InternalExecute(void);
|
|
|
|
CheckResult RunCheck(void) const;
|
2012-06-13 13:42:55 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif /* NAGIOSCHECKTASK_H */
|