1 /**
2 * Wrap the XML key for a subscribe() invocation.
3 * <p>
4 * See QueryKeySaxFactory for a syntax description of the allowed xml structure
5 * </p>
6 * @see org.xmlBlaster.util.key.QueryKeySaxFactory
7 * @see <a href="http://www.xmlBlaster.org/xmlBlaster/doc/requirements/interface.subscribe.html" target="others">the interface.subscribe requirement</a>
8 *
9 * @author <a href="mailto:xmlBlaster@marcelruff.info">Marcel Ruff</a>
10 * @author <a href="mailto:laghi@swissinfo.org">Michele Laghi</a>
11 */
12
13 #ifndef _CLIENT_KEY_SUBSCRIBEKEY_H
14 #define _CLIENT_KEY_SUBSCRIBEKEY_H
15
16 #include <client/key/UnSubscribeKey.h>
17 #include <util/Constants.h>
18
19 namespace org { namespace xmlBlaster { namespace client { namespace key {
20
21 class Dll_Export SubscribeKey : public org::xmlBlaster::client::key::UnSubscribeKey
22 {
23 public:
24
25 /**
26 * Minimal constructor.
27 */
28 SubscribeKey(org::xmlBlaster::util::Global& global);
29
30 SubscribeKey(org::xmlBlaster::util::Global& global, const std::string& query,
31 const std::string& queryType=org::xmlBlaster::util::Constants::EXACT);
32
33 SubscribeKey(org::xmlBlaster::util::Global& global, const org::xmlBlaster::util::key::QueryKeyData& data);
34
35 SubscribeKey(const SubscribeKey& key);
36
37 SubscribeKey& operator =(const SubscribeKey& key);
38
39 /**
40 * Set the domain for this message, can be used for a simple grouping of
41 * messages to their master node with xmlBlaster clusters.
42 * @param The domain, any chosen std::string in your problem domain, e.g. "RUGBY" or "RADAR_TRACK"
43 * defaults to "" where the local xmlBlaster instance is the master of the message.
44 * @see <a href="http://www.xmlblaster.org/xmlBlaster/doc/requirements/cluster.html">The cluster requirement</a>
45 */
46 void setDomain(const std::string& domain);
47
48 /**
49 * Access the domain setting
50 * @return A domain std::string or null
51 */
52 std::string getDomain() const;
53
54 };
55
56 }}}} // namespace
57
58 #endif
syntax highlighted by Code2HTML, v. 0.9.1