#ifndef __AUDITPLUGIN_HPP_ #define __AUDITPLUGIN_HPP_ #include #include "UtilBase.hpp" #include "Network/Socket.h" #include #include #include #include "Util/logger.h" #include "Poller/Timer.h" #include #include "PluginSubscriber.hpp" #include "PuginFactory.hpp" using namespace std; using namespace toolkit; namespace gsd { class AuditPlugin: public PluginSubscriber, public PluginBase { private: AuditPlugin(): PluginBase(){ } public: using Ptr = std::shared_ptr; /** * @description: 获取Ptr * @return {*} */ static std::shared_ptr getPtr(); /** * @description: Init * @return {*} */ virtual bool Init(); /** * @description: StartTask * @return {*} */ virtual bool StartTask(); /** * @description: Alive * @return {*} */ virtual bool Alive(); /** * @description: 释放资源 * @return {*} */ virtual void Destroy(); /** * @description: RestPlugin * @return {*} */ virtual bool RestPlugin(){ return true; } /** * @description: PluginTaskCheck * @return {*} */ virtual bool PluginTaskCheck(); /** * @description: ~AuditPlugin * @return {*} */ ~AuditPlugin(){ InfoL; this->Destroy(); } private: Timer::Ptr timer = nullptr; unordered_map()>> map_; std::shared_ptr pool = nullptr; }; } // namespace gsd #endif