00001
00002 #ifndef _MANAGEMENT_DESTINATION_
00003 #define _MANAGEMENT_DESTINATION_
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 Destination : 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 uint64_t sessionRef;
00043 std::string name;
00044
00045
00046 uint8_t flowMode;
00047 uint32_t maxMsgCredits;
00048 uint32_t maxByteCredits;
00049 uint32_t msgCredits;
00050 uint32_t byteCredits;
00051
00052
00053 static void writeSchema (qpid::framing::Buffer& buf);
00054 void writeConfig (qpid::framing::Buffer& buf);
00055 void writeInstrumentation (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 public:
00064
00065 friend class PackageQpid;
00066 typedef boost::shared_ptr<Destination> shared_ptr;
00067
00068 Destination (Manageable* coreObject, Manageable* _parent, std::string _name);
00069 ~Destination (void);
00070
00071 std::string getPackageName (void) { return packageName; }
00072 std::string getClassName (void) { return className; }
00073 uint8_t* getMd5Sum (void) { return md5Sum; }
00074
00075
00076 static const uint32_t METHOD_THROTTLE = 1;
00077 static const uint32_t METHOD_STOP = 2;
00078 static const uint32_t METHOD_START = 3;
00079
00080
00081 inline void set_flowMode (uint8_t val){
00082 sys::RWlock::ScopedWlock writeLock (accessLock);
00083 flowMode = val;
00084 instChanged = true;
00085 }
00086 inline void set_maxMsgCredits (uint32_t val){
00087 sys::RWlock::ScopedWlock writeLock (accessLock);
00088 maxMsgCredits = val;
00089 instChanged = true;
00090 }
00091 inline void set_maxByteCredits (uint32_t val){
00092 sys::RWlock::ScopedWlock writeLock (accessLock);
00093 maxByteCredits = val;
00094 instChanged = true;
00095 }
00096 inline void set_msgCredits (uint32_t val){
00097 sys::RWlock::ScopedWlock writeLock (accessLock);
00098 msgCredits = val;
00099 instChanged = true;
00100 }
00101 inline void set_byteCredits (uint32_t val){
00102 sys::RWlock::ScopedWlock writeLock (accessLock);
00103 byteCredits = val;
00104 instChanged = true;
00105 }
00106
00107 };
00108
00109 }}
00110
00111
00112 #endif