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/Uuid.h"
00029
00030 namespace qpid {
00031 namespace management {
00032
00033 class Agent : public ManagementObject
00034 {
00035 private:
00036
00037 static std::string packageName;
00038 static std::string className;
00039 static uint8_t md5Sum[16];
00040
00041
00042 framing::Uuid id;
00043
00044
00045
00046
00047 static void writeSchema (qpid::framing::Buffer& buf);
00048 void writeConfig (qpid::framing::Buffer& buf);
00049 void writeInstrumentation (qpid::framing::Buffer& buf,
00050 bool skipHeaders = false);
00051 void doMethod (std::string methodName,
00052 qpid::framing::Buffer& inBuf,
00053 qpid::framing::Buffer& outBuf);
00054 writeSchemaCall_t getWriteSchemaCall (void) { return writeSchema; }
00055
00056
00057 bool getInstChanged (void) { return false; }
00058
00059 public:
00060
00061 friend class PackageQpid;
00062 typedef boost::shared_ptr<Agent> shared_ptr;
00063
00064 Agent (Manageable* coreObject);
00065 ~Agent (void);
00066
00067 std::string getPackageName (void) { return packageName; }
00068 std::string getClassName (void) { return className; }
00069 uint8_t* getMd5Sum (void) { return md5Sum; }
00070
00071
00072
00073
00074 inline void set_id (framing::Uuid val){
00075 sys::RWlock::ScopedWlock writeLock (accessLock);
00076 id = val;
00077 configChanged = true;
00078 }
00079
00080 };
00081
00082 }}
00083
00084
00085 #endif