system_communication mq.cpp 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. /*
  2. * @Author: yct 18202736439@163.com
  3. * @Date: 2022-09-30 18:11:59
  4. * @LastEditors: yct 18202736439@163.com
  5. * @LastEditTime: 2022-09-30 18:41:52
  6. * @FilePath: /puai_wj_2021/system/system_communication mq.cpp
  7. * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  8. */
  9. //
  10. // Created by huli on 2020/6/28.
  11. //
  12. #include "system_communication_mq.h"
  13. #include "../system/system_executor.h"
  14. System_communication_mq::System_communication_mq()
  15. {
  16. }
  17. System_communication_mq::~System_communication_mq()
  18. {
  19. }
  20. //检查消息是否有效, 主要检查消息类型和接受者, 判断这条消息是不是给我的.
  21. Error_manager System_communication_mq::check_msg(Rabbitmq_message* p_msg)
  22. {
  23. return SUCCESS;
  24. }
  25. //检查执行者的状态, 判断能否处理这条消息, 需要子类重载
  26. Error_manager System_communication_mq::check_executer(Rabbitmq_message* p_msg)
  27. {
  28. return SUCCESS;
  29. }
  30. //处理消息, 需要子类重载
  31. Error_manager System_communication_mq::execute_msg(Rabbitmq_message* p_msg)
  32. {
  33. return SUCCESS;
  34. }
  35. //定时封装发送消息, 一般为心跳和状态信息, 需要子类重载
  36. Error_manager System_communication_mq::auto_encapsulate_status()
  37. {
  38. return System_executor::get_instance_references().encapsulate_send_mq_status();
  39. }