1 /*------------------------------------------------------------------------------
2 Name: CallbackAddress.h
3 Project: xmlBlaster.org
4 Copyright: xmlBlaster.org, see xmlBlaster-LICENSE file
5 Comment: Holding callback address std::string and protocol std::string
6 Version: $Id: CallbackAddress.h 12937 2004-11-24 20:15:11Z ruff $
7 ------------------------------------------------------------------------------*/
8
9 /**
10 * Helper class holding callback address std::string and protocol std::string.
11 * <p />
12 * <pre>
13 * <callback type='XMLRPC' sessionId='4e56890ghdFzj0'
14 * pingInterval='60000' retries='5' delay='10000'
15 * oneway='false' useForSubjectQueue='true'
16 * dispatchPlugin='Priority,1.0'>
17 * http://server:8080/cb
18 * <compress type='gzip' minSize='1000'/>
19 * <burstMode collectTime='400'/>
20 * </callback>
21 * </pre>
22 */
23 #ifndef _UTIL_CFG_CALLBACKADDRESS_H
24 #define _UTIL_CFG_CALLBACKADDRESS_H
25
26 #include <util/xmlBlasterDef.h>
27 #include <util/qos/address/AddressBase.h>
28 #include <string>
29
30 namespace org { namespace xmlBlaster { namespace util { namespace qos { namespace address {
31
32 class Dll_Export CallbackAddress : public org::xmlBlaster::util::qos::address::AddressBase
33 {
34 private:
35
36 /**
37 * Configure property settings
38 */
39 inline void initialize();
40
41 public:
42
43 /**
44 * @param type The protocol type, e.g. "IOR", "SOCKET", "XMLRPC"
45 * @param nodeId A unique std::string (typically the cluster node id we connect to).<br />
46 * This is used for extended env-variable support, e.g. for a given
47 * <code>nodeId="heron"</ code>
48 * the command line argument (or xmlBlaster.property entry)
49 * <code>-cb.retries[heron] 20</code>
50 * is precedence over
51 * <code>-cb.retries 10</code>
52 */
53 CallbackAddress(org::xmlBlaster::util::Global& global, const std::string& type="", const std::string nodeId="");
54
55 /**
56 * copy constructor
57 */
58 CallbackAddress(const org::xmlBlaster::util::qos::address::AddressBase& addr);
59
60 /**
61 * Assignment operator
62 */
63 CallbackAddress& operator =(const org::xmlBlaster::util::qos::address::AddressBase& addr);
64
65 /**
66 * Shall this address be used for subject queue messages?
67 * @return false if address is for session queue only
68 */
69 bool useForSubjectQueue();
70
71 /**
72 * Shall this address be used for subject queue messages?
73 * @param useForSubjectQueue false if address is for session queue only
74 */
75 void useForSubjectQueue(bool useForSubjectQueue);
76
77 /** @return The literal address as given by getRawAddress() */
78 std::string toString();
79
80 /**
81 * Get a usage std::string for the server side supported callback connection parameters
82 */
83 std::string usage();
84 };
85
86 }}}}} // namespace
87
88 #endif
syntax highlighted by Code2HTML, v. 0.9.1