00001
00002 #ifndef _MANAGEMENT_AGENT_
00003 #define _MANAGEMENT_AGENT_
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 Agent : 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 uint64_t connectionRef;
00044 std::string label;
00045 uint64_t registeredTo;
00046 framing::Uuid systemId;
00047 uint32_t objectIdBank;
00048
00049
00050
00051
00052
00053 static void writeSchema (qpid::framing::Buffer& buf);
00054 void writeProperties (qpid::framing::Buffer& buf);
00055 void writeStatistics (qpid::framing::Buffer& buf,
00056 bool skipHeaders = false);
00057 void doMethod (std::string methodName,
00058 qpid::framing::Buffer& inBuf,
00059 qpid::framing::Buffer& outBuf);
00060 writeSchemaCall_t getWriteSchemaCall(void) { return writeSchema; }
00061
00062
00063 bool getInstChanged (void) { return false; }
00064
00065 public:
00066
00067 friend class PackageQpid;
00068
00069 Agent (ManagementAgent* agent,
00070 Manageable* coreObject);
00071 ~Agent (void);
00072
00073
00074
00075 std::string& getPackageName (void) { return packageName; }
00076 std::string& getClassName (void) { return className; }
00077 uint8_t* getMd5Sum (void) { return md5Sum; }
00078
00079
00080
00081
00082 inline void set_connectionRef (uint64_t val){
00083 sys::Mutex::ScopedLock mutex(accessLock);
00084 connectionRef = val;
00085 configChanged = true;
00086 }
00087 inline void set_label (std::string val){
00088 sys::Mutex::ScopedLock mutex(accessLock);
00089 label = val;
00090 configChanged = true;
00091 }
00092 inline void set_registeredTo (uint64_t val){
00093 sys::Mutex::ScopedLock mutex(accessLock);
00094 registeredTo = val;
00095 configChanged = true;
00096 }
00097 inline void set_systemId (framing::Uuid val){
00098 sys::Mutex::ScopedLock mutex(accessLock);
00099 systemId = val;
00100 configChanged = true;
00101 }
00102 inline void set_objectIdBank (uint32_t val){
00103 sys::Mutex::ScopedLock mutex(accessLock);
00104 objectIdBank = val;
00105 configChanged = true;
00106 }
00107
00108 };
00109
00110 }}
00111
00112 #endif