diff options
| author | Kenneth Anthony Giusti <kgiusti@apache.org> | 2010-07-08 20:29:52 +0000 |
|---|---|---|
| committer | Kenneth Anthony Giusti <kgiusti@apache.org> | 2010-07-08 20:29:52 +0000 |
| commit | 459f48df9d6b62a0f72be50c8ce082c1317c736e (patch) | |
| tree | 144cf9f423de1fb798868ed22229ce159738d714 /cpp/src/qpid/agent | |
| parent | df239e9f6987f45162d7ccd6459f1b73a81b39f9 (diff) | |
| download | qpid-python-459f48df9d6b62a0f72be50c8ce082c1317c736e.tar.gz | |
QMF: add api to get agent id, and new object id constructor that uses agent id.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@961919 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/agent')
| -rw-r--r-- | cpp/src/qpid/agent/ManagementAgentImpl.cpp | 15 | ||||
| -rw-r--r-- | cpp/src/qpid/agent/ManagementAgentImpl.h | 2 |
2 files changed, 17 insertions, 0 deletions
diff --git a/cpp/src/qpid/agent/ManagementAgentImpl.cpp b/cpp/src/qpid/agent/ManagementAgentImpl.cpp index bc841ca3ee..351e0bfd00 100644 --- a/cpp/src/qpid/agent/ManagementAgentImpl.cpp +++ b/cpp/src/qpid/agent/ManagementAgentImpl.cpp @@ -144,6 +144,21 @@ void ManagementAgentImpl::setName(const string& vendor, const string& product, c attrMap["_name"] = name_address; } + +void ManagementAgentImpl::getName(string& vendor, string& product, string& instance) +{ + vendor = std::string(attrMap["_vendor"]); + product = std::string(attrMap["_product"]); + instance = std::string(attrMap["_instance"]); +} + + +const std::string& ManagementAgentImpl::getAddress() +{ + return name_address; +} + + void ManagementAgentImpl::init(const string& brokerHost, uint16_t brokerPort, uint16_t intervalSeconds, diff --git a/cpp/src/qpid/agent/ManagementAgentImpl.h b/cpp/src/qpid/agent/ManagementAgentImpl.h index 7d4531f1b8..4a58807e98 100644 --- a/cpp/src/qpid/agent/ManagementAgentImpl.h +++ b/cpp/src/qpid/agent/ManagementAgentImpl.h @@ -54,6 +54,8 @@ class ManagementAgentImpl : public ManagementAgent, public client::MessageListen void setName(const std::string& vendor, const std::string& product, const std::string& instance=""); + void getName(std::string& vendor, std::string& product, std::string& instance); + const std::string& getAddress(); void init(const std::string& brokerHost = "localhost", uint16_t brokerPort = 5672, uint16_t intervalSeconds = 10, |
