lintel 0.2.0
Loading...
Searching...
No Matches
MessageQueueCliComponent.h
Go to the documentation of this file.
1#ifndef MESSAGEQUEUECLICOMPONENT_H
2#define MESSAGEQUEUECLICOMPONENT_H
7
8namespace lintel {
11{
12private:
13 static constexpr std::string_view m_name = "MessageQueue";
14 static constexpr std::string_view m_alias = "Mq";
15 static constexpr std::string_view m_description = "The component can be used to show the message queue statistics";
16 std::shared_ptr<MesssageQueueApi> m_messageQueueApi;
17
18 enum Commands { Undefined, ShowMessageQueues };
19
20 // Flags
21 std::optional<std::string> m_processName;
22 std::optional<std::string> m_messageQueueName;
23
25
27 static void printMessageQueues(const std::vector<MessageQueueDto> &messageQueueDtos);
28
29public:
31 explicit MessageQueueCliComponent(std::shared_ptr<MesssageQueueApi> messsageQueueApi);
32
33 void onHelp() override;
34
35 void
36 onCommand(const UserDto &userDto, const std::string &command, const std::vector<std::string> &parameters) override;
37
38 void onShowMenu() override;
39
40 bool onMenu(const std::string &component) override;
41
42 bool onExit() override;
43
44 void printCommandList(std::set<std::string> menuAlias) override;
45
46 std::vector<std::string> allCommandsOf() override;
47};
48
49}// namespace lintel
50#endif// MESSAGEQUEUECLICOMPONENT_H
Definition CommandLineComponent.h:17
Definition CommandParser.h:21
Definition MessageQueueCliComponent.h:11
std::vector< std::string > allCommandsOf() override
bool onMenu(const std::string &component) override
void onCommand(const UserDto &userDto, const std::string &command, const std::vector< std::string > &parameters) override
MessageQueueCliComponent(std::shared_ptr< MesssageQueueApi > messsageQueueApi)
void printCommandList(std::set< std::string > menuAlias) override
Definition UserDto.h:16
Definition BaseFeature.h:6
constexpr std::string_view type_name()
Definition TypeName.h:9