summaryrefslogtreecommitdiff
path: root/cpp/include/qmf/Agent.h
diff options
context:
space:
mode:
authorTed Ross <tross@apache.org>2010-09-21 21:48:41 +0000
committerTed Ross <tross@apache.org>2010-09-21 21:48:41 +0000
commit3cfbdf0e60c94733c0a79e94bdf8627afc6bb2a4 (patch)
treee33d57bca9a2c2275e76f882484ac3ea913e83fd /cpp/include/qmf/Agent.h
parent449ab0f1062c0eac0234f84556de60436ba2ee9d (diff)
downloadqpid-python-3cfbdf0e60c94733c0a79e94bdf8627afc6bb2a4.tar.gz
QMFv2 Additions:
- QMFv2 schema encoding completed - Schema queries handled by the agent and initiated by the console by user request - Full query support with predicates evaluated on the agent (regex not yet implemented) - Agent filtering in the console - Agent aging in the console - Unit tests git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@999662 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/include/qmf/Agent.h')
-rw-r--r--cpp/include/qmf/Agent.h42
1 files changed, 42 insertions, 0 deletions
diff --git a/cpp/include/qmf/Agent.h b/cpp/include/qmf/Agent.h
index 8ddea0fae9..8d427ab2fb 100644
--- a/cpp/include/qmf/Agent.h
+++ b/cpp/include/qmf/Agent.h
@@ -65,10 +65,52 @@ namespace qmf {
qpid::messaging::Duration timeout=qpid::messaging::Duration::MINUTE);
QMF_EXTERN uint32_t callMethodAsync(const std::string&, const qpid::types::Variant::Map&, const DataAddr&);
+ /**
+ * Query the agent for a list of schema classes that it exposes. This operation comes in both
+ * synchronous (blocking) and asynchronous flavors.
+ *
+ * This method will typically be used after receiving an AGENT_SCHEMA_UPDATE event from the console session.
+ * It may also be used on a newly discovered agent to learn what schemata are exposed.
+ *
+ * querySchema returns a ConsoleEvent that contains a list of SchemaId objects exposed by the agent.
+ * This list is cached locally and can be locally queried using getPackage[Count] and getSchemaId[Count].
+ */
+ QMF_EXTERN ConsoleEvent querySchema(qpid::messaging::Duration timeout=qpid::messaging::Duration::MINUTE);
+ QMF_EXTERN uint32_t querySchemaAsync();
+
+ /**
+ * Get the list of schema packages exposed by the agent.
+ *
+ * getPackageCount returns the number of packages exposed.
+ * getPackage returns the name of the package by index (0..package-count)
+ *
+ * Note that both of these calls are synchronous and non-blocking. They only return locally cached data
+ * and will not send any messages to the remote agent. Use querySchema[Async] to get the latest schema
+ * information from the remote agent.
+ */
QMF_EXTERN uint32_t getPackageCount() const;
QMF_EXTERN const std::string& getPackage(uint32_t) const;
+
+ /**
+ * Get the list of schema identifiers for a particular package.
+ *
+ * getSchemaIdCount returns the number of IDs in the indicates package.
+ * getSchemaId returns the SchemaId by index (0..schema-id-count)
+ *
+ * Note that both of these calls are synchronous and non-blocking. They only return locally cached data
+ * and will not send any messages to the remote agent. Use querySchema[Async] to get the latest schema
+ * information from the remote agent.
+ */
QMF_EXTERN uint32_t getSchemaIdCount(const std::string&) const;
QMF_EXTERN SchemaId getSchemaId(const std::string&, uint32_t) const;
+
+ /**
+ * Get detailed schema information for a specified schema ID.
+ *
+ * This call will return cached information if it is available. If not, it will send a query message to the
+ * remote agent and block waiting for a response. The timeout argument specifies the maximum time to wait
+ * for a response from the agent.
+ */
QMF_EXTERN Schema getSchema(const SchemaId&, qpid::messaging::Duration timeout=qpid::messaging::Duration::MINUTE);