00001
00002 #ifndef _MANAGEMENT_SYSTEM_
00003 #define _MANAGEMENT_SYSTEM_
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #include "qpid/management/ManagementObject.h"
00028 #include "qpid/framing/FieldTable.h"
00029 #include "qpid/framing/Uuid.h"
00030
00031 namespace qpid {
00032 namespace management {
00033
00034 class System : public ManagementObject
00035 {
00036 private:
00037
00038 static std::string packageName;
00039 static std::string className;
00040 static uint8_t md5Sum[16];
00041
00042
00043 framing::Uuid systemId;
00044 std::string osName;
00045 std::string nodeName;
00046 std::string release;
00047 std::string version;
00048 std::string machine;
00049
00050
00051
00052
00053
00054 static void writeSchema (qpid::framing::Buffer& buf);
00055 void writeProperties (qpid::framing::Buffer& buf);
00056 void writeStatistics (qpid::framing::Buffer& buf,
00057 bool skipHeaders = false);
00058 void doMethod (std::string methodName,
00059 qpid::framing::Buffer& inBuf,
00060 qpid::framing::Buffer& outBuf);
00061 writeSchemaCall_t getWriteSchemaCall(void) { return writeSchema; }
00062
00063
00064 bool getInstChanged (void) { return false; }
00065
00066 public:
00067
00068 friend class PackageQpid;
00069
00070 System (ManagementAgent* agent,
00071 Manageable* coreObject, framing::Uuid _systemId);
00072 ~System (void);
00073
00074
00075
00076 std::string& getPackageName (void) { return packageName; }
00077 std::string& getClassName (void) { return className; }
00078 uint8_t* getMd5Sum (void) { return md5Sum; }
00079
00080
00081
00082
00083 inline void set_osName (std::string val){
00084 sys::Mutex::ScopedLock mutex(accessLock);
00085 osName = val;
00086 configChanged = true;
00087 }
00088 inline void set_nodeName (std::string val){
00089 sys::Mutex::ScopedLock mutex(accessLock);
00090 nodeName = val;
00091 configChanged = true;
00092 }
00093 inline void set_release (std::string val){
00094 sys::Mutex::ScopedLock mutex(accessLock);
00095 release = val;
00096 configChanged = true;
00097 }
00098 inline void set_version (std::string val){
00099 sys::Mutex::ScopedLock mutex(accessLock);
00100 version = val;
00101 configChanged = true;
00102 }
00103 inline void set_machine (std::string val){
00104 sys::Mutex::ScopedLock mutex(accessLock);
00105 machine = val;
00106 configChanged = true;
00107 }
00108
00109 };
00110
00111 }}
00112
00113 #endif