1 /*------------------------------------------------------------------------------
2 Name: UnSubscribeQueueEntry.h
3 Project: xmlBlaster.org
4 Copyright: xmlBlaster.org, see xmlBlaster-LICENSE file
5 ------------------------------------------------------------------------------*/
6 #ifndef _UTIL_QUEUE_UNSUBSCRIBEQUEUEENRY_H
7 #define _UTIL_QUEUE_UNSUBSCRIBEQUEUEENRY_H
8
9 #include <util/MethodName.h>
10 #include <util/queue/MsgQueueEntry.h>
11 #include <client/qos/UnSubscribeQos.h>
12 #include <client/qos/UnSubscribeReturnQos.h>
13 #include <client/key/UnSubscribeKey.h>
14
15 /**
16 * Class embedding messages or information to be stored on the client queues
17 * Note that all content is copied when passed to the constructors.
18 * This way this queue entry is the owner of the content (and therefore will
19 * delete it when its destructor is called).
20 *
21 * @author <a href='mailto:laghi@swissinfo.org'>Michele Laghi</a>
22 */
23 namespace org { namespace xmlBlaster { namespace util { namespace queue {
24
25 class Dll_Export UnSubscribeQueueEntry : public org::xmlBlaster::util::queue::MsgQueueEntry
26 {
27 public:
28
29 /**
30 * Constructor suited for operations like subscribe and unSubscribe
31 */
32 UnSubscribeQueueEntry(org::xmlBlaster::util::Global& global,
33 const org::xmlBlaster::client::key::UnSubscribeKey& unSubscribeKey,
34 const org::xmlBlaster::client::qos::UnSubscribeQos& unSubscribeQos,
35 int priority=NORM_PRIORITY,
36 org::xmlBlaster::util::Timestamp uniqueId = TimestampFactory::getInstance().getTimestamp());
37
38 MsgQueueEntry *getClone() const;
39
40 virtual bool isUnSubscribe() const;
41
42 // this should actually be in another interface but since it is an only method we put it here.
43 const org::xmlBlaster::util::queue::MsgQueueEntry& send(org::xmlBlaster::util::dispatch::I_ConnectionsHandler& connectionsHandler) const;
44
45 org::xmlBlaster::client::qos::UnSubscribeQos getUnSubscribeQos() const;
46
47 org::xmlBlaster::client::key::UnSubscribeKey getUnSubscribeKey() const;
48
49 org::xmlBlaster::client::qos::UnSubscribeReturnQos getUnSubscribeReturnQos() const;
50
51 virtual std::string toXml(const std::string& indent="") const;
52
53 };
54
55 }}}} // namespace
56
57 #endif
syntax highlighted by Code2HTML, v. 0.9.1