hce-node application  1.4.3
HCE Hierarchical Cluster Engine node application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
ApplicationPattern.h
Go to the documentation of this file.
1 #ifndef APPLICATIONPATTERN_H
2 #define APPLICATIONPATTERN_H
3 #include <stdlib.h>
4 #include <stdio.h>
5 #include <pwd.h>
6 #include <unistd.h>
7 #include <new>
8 #include <ProcFileSystem.h>
9 #include <Config.h>
10 #include <Syslog.h>
11 #include <Signals.h>
12 #include <ErrorNo.h>
13 #include <AdminClient.h>
14 #include <BaseHandler.h>
15 #include <AStorageHandler.h>
16 #include <StatusHandler.h>
17 #include <Restart.h>
18 #include <LogHandler.h>
19 #include <revision.h>
20 
22 {
23  public:
24  ApplicationPattern(char **argv, const char *configFile, unsigned int logDirection, const char *ident, const char *title);
25  virtual ~ApplicationPattern();
26  virtual bool init(const char *dumpFile = NULL);
27  virtual void run() = 0;
28 
29  protected:
30 
31  char *configFile;
32  char *ident;
33  static int exitFlag;
34  SysLog *log;
37  char **argv;
42  List<BaseHandler*> handlerList;
43 
44  private:
45  bool setUser(const char *user);
46  static void signalFunc(int sigNum);
47 
48 };
49 #endif