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