1 /*------------------------------------------------------------------------------
2 Name: I_ConnectionsHandler.h
3 Project: xmlBlaster.org
4 Copyright: xmlBlaster.org, see xmlBlaster-LICENSE file
5 Comment: Extended Interface to org::xmlBlaster::client::protocol::I_XmlBlasterConnections for ConnectionHandler
6 ------------------------------------------------------------------------------*/
7
8 /**
9 * Interface for XmlBlaster, the supported methods on c++ client side. This is
10 * a pure virtual class.
11 * <p />
12 * @see <a href="http://www.xmlBlaster.org/xmlBlaster/src/java/org/xmlBlaster/protocol/corba/xmlBlaster.idl" target="others">CORBA xmlBlaster.idl</a>
13 */
14 #ifndef _UTIL_DISPATCH_ICONNECTIONSHANDLER_H
15 #define _UTIL_DISPATCH_ICONNECTIONSHANDLER_H
16
17 #include <util/xmlBlasterDef.h>
18 #include <client/protocol/I_XmlBlasterConnection.h>
19
20 // circular dependency I_ConnectionsHandler -> org::xmlBlaster::util::queue::I_Queue -> org::xmlBlaster::util::queue::MsgQueueEntry
21 #ifndef _UTIL_QUEUE_I_QUEUE_H
22 namespace org { namespace xmlBlaster { namespace util { namespace queue {
23 class I_Queue;
24 }}}}
25 #endif
26
27 namespace org { namespace xmlBlaster { namespace util { namespace dispatch {
28
29 enum States {START, ALIVE, POLLING, DEAD, END};
30
31 class Dll_Export I_ConnectionsHandler : public org::xmlBlaster::client::protocol::I_XmlBlasterConnection
32 {
33 public:
34 virtual ~I_ConnectionsHandler() {}
35
36 /**
37 * Flushes all entries in the queue, i.e. the entries of the queue are sent to xmlBlaster.
38 * If the queue is empty or NULL, then 0 is returned. If the state is in POLLING or DEAD, then -1 is
39 * returned.. This method blocks until all entries in the queue have been sent.
40 */
41 virtual long flushQueue() = 0;
42
43 /**
44 * gets a pointer to the queue used.
45 */
46 virtual org::xmlBlaster::util::queue::I_Queue* getQueue() = 0;
47
48 /**
49 * Returns true if the connection is in failsafe mode. You can activate this mode by invoking initFailsafe
50 * in org::xmlBlaster::client::XmlBlasterAccess.
51 */
52 virtual bool isFailsafe() const = 0;
53
54 virtual bool isConnected() const = 0;
55
56 virtual org::xmlBlaster::util::qos::ConnectReturnQosRef connectRaw(const org::xmlBlaster::util::qos::ConnectQosRef& connectQos) = 0;
57
58 virtual org::xmlBlaster::client::protocol::I_XmlBlasterConnection& getConnection() const = 0;
59
60 virtual org::xmlBlaster::util::qos::ConnectReturnQosRef getConnectReturnQos() = 0;
61
62 virtual org::xmlBlaster::util::qos::ConnectQosRef getConnectQos() = 0;
63
64 };
65
66
67 }}}} // namespaces
68
69 #endif
syntax highlighted by Code2HTML, v. 0.9.1