hce-node application  1.4.3
HCE Hierarchical Cluster Engine node application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Admin.hpp
Go to the documentation of this file.
1 
16 #ifndef __HCE_ADMIN_INCLUDED__
17 #define __HCE_ADMIN_INCLUDED__
18 
19 #include <sstream>
20 #include <map>
21 
22 #include "Handler.hpp"
23 
24 namespace HCE {
25  namespace handlers {
26 
27  class Admin: public HCE::handlers::Handler {
28  public:
29  Admin(std::string name, zmq::context_t& ctx,
30  const std::string& clientIdentity, std::string connectionString,
31  int64_t startedAt, unsigned char logPriority, const std::string& iniFile="");
32  ~Admin();
33  void stopClients(void);
34 
35  protected:
36  int initialize(void);
37  void deinitialize(void);
38  void* process(void);
39 
40  void handleInternalMessage(void);
41  void handleExternalMessage(void);
42 
43  void processDataMessage(zmsg& msg);
44 
46  void processDataMessageInproc(zmsg& msg);
47  void registerClientInproc(const std::string& identity);
48 
49  unsigned char processAdminRequest(zmsg& msg);
50  static std::vector<std::string> parseAdminRequest(const std::string& command);
51  std::string processAdminCommands(std::string& command, std::string& parameters);
52 
54  std::string getPropertyInformation(void);
55 
57  void setStatRequestsTotal(unsigned int statRequestsTotal);
59  unsigned int getStatRequestsTotal(void);
60 
63 
65  std::vector<ClientWorkerItem> _queueInproc;
68  };
69  }
70 }
71 
72 #endif /* __HCE_ADMIN_INCLUDED__ */