UniSet  2.8.0
DBServer.h
1 /*
2  * Copyright (c) 2015 Pavel Vainerman.
3  *
4  * This program is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU Lesser General Public License as
6  * published by the Free Software Foundation, version 2.1.
7  *
8  * This program is distributed in the hope that it will be useful, but
9  * WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11  * Lesser General Lesser Public License for more details.
12  *
13  * You should have received a copy of the GNU Lesser General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  */
16 // --------------------------------------------------------------------------
20 // --------------------------------------------------------------------------
21 #ifndef DBServer_H_
22 #define DBServer_H_
23 // --------------------------------------------------------------------------
24 #include "UniSetTypes.h"
25 #include "UniSetObject.h"
26 #include "LogServer.h"
27 #include "DebugStream.h"
28 #include "LogAgregator.h"
29 //------------------------------------------------------------------------------------------
30 namespace uniset
31 {
51  class DBServer:
52  public UniSetObject
53  {
54  public:
55  DBServer( uniset::ObjectId id, const std::string& prefix = "db" );
56  DBServer( const std::string& prefix = "db" );
57  ~DBServer();
58 
59  static std::string help_print();
60 
61  virtual uniset::SimpleInfo* getInfo( const char* userparam = "" ) override;
62 
63  protected:
64 
65  virtual void processingMessage( const uniset::VoidMessage* msg ) override;
66  virtual void sysCommand( const uniset::SystemMessage* sm ) override;
67  virtual void confirmInfo( const uniset::ConfirmMessage* cmsg ) {}
68 
69  virtual bool activateObject() override;
70  virtual void initDBServer() {}
71  virtual std::string getMonitInfo( const std::string& params ){ return ""; }
72 
73 
74  std::shared_ptr<LogAgregator> loga;
75  std::shared_ptr<DebugStream> dblog;
76  std::shared_ptr<LogServer> logserv;
77  std::string logserv_host = {""};
78  int logserv_port = {0};
79 
80  const std::string prefix = { "db" };
81 
82  private:
83  };
84  // -------------------------------------------------------------------------
85 } // end of uniset namespace
86 //------------------------------------------------------------------------------------------
87 #endif
Definition: CommonEventLoop.h:14
virtual void processingMessage(const uniset::VoidMessage *msg) override
Definition: DBServer.cc:88
Definition: DBServer.h:51
Definition: MessageType.h:170
Definition: UniSetObject.h:73
Definition: MessageType.h:236
Definition: MessageType.h:90
virtual bool activateObject() override
Активизация объекта (переопределяется для необходимых действий после активизации)
Definition: DBServer.cc:103
Definition: UniSetTypes_i.idl:64
long ObjectId
Definition: UniSetTypes_i.idl:30