TestEmptyContent Class Reference

This client connects to xmlBlaster and subscribes to a message. More...

Inheritance diagram for TestEmptyContent:

Inheritance graph
[legend]
Collaboration diagram for TestEmptyContent:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 TestEmptyContent (Global &glob)
virtual ~TestEmptyContent ()
bool reachedAlive (StatesEnum, I_ConnectionsHandler *)
 This is the callback method invoked from org::xmlBlaster::util::dispatch::ConnectionsHandler notifying the client that a connection has been established and that its status is now ALIVE.
void reachedDead (StatesEnum, I_ConnectionsHandler *)
 This is the callback method invoked from org::xmlBlaster::util::dispatch::ConnectionsHandler informing the client that the connection was lost (i.e.
void reachedPolling (StatesEnum, I_ConnectionsHandler *)
 This is the callback method invoked from org::xmlBlaster::util::dispatch::ConnectionsHandler informing the client that the connection state has changed to POLLING.
void execute ()
string update (string &, UpdateKey &updateKey, unsigned char *, long, UpdateQos &updateQos)
 Callbacks from xmlBlaster arrive here.

Detailed Description

This client connects to xmlBlaster and subscribes to a message.

We then publish the message and receive it asynchronous in the update() method.

Note that the CORBA layer is transparently hidden, and all code conforms to STD C++ (with STL).

 Invoke: TestEmptyContent
 
See also:
xmlBlaster interface

Definition at line 37 of file TestEmptyContent.cpp.


Constructor & Destructor Documentation

TestEmptyContent::TestEmptyContent ( Global glob  ) 

Definition at line 46 of file TestEmptyContent.cpp.

References org::xmlBlaster::util::I_Log::info().

virtual TestEmptyContent::~TestEmptyContent (  )  [virtual]

Definition at line 57 of file TestEmptyContent.cpp.


Member Function Documentation

bool TestEmptyContent::reachedAlive ( StatesEnum  oldState,
I_ConnectionsHandler connectionsHandler 
) [virtual]

This is the callback method invoked from org::xmlBlaster::util::dispatch::ConnectionsHandler notifying the client that a connection has been established and that its status is now ALIVE.

It has a bool return which informs the org::xmlBlaster::util::dispatch::ConnectionsHandler what to do with the entries in the queue. If you return 'true', then the queue is flushed (i.e. the contents of the queue are sent to xmlBlaster). If you return 'false', then the contents of the queue are left untouched. You can then erase all entries manually. Note that this method is invoked also when the connection has been established the first time.

Implements org::xmlBlaster::client::I_ConnectionProblems.

Definition at line 62 of file TestEmptyContent.cpp.

References org::xmlBlaster::util::I_Log::info().

void TestEmptyContent::reachedDead ( StatesEnum  oldState,
I_ConnectionsHandler connectionsHandler 
) [virtual]

This is the callback method invoked from org::xmlBlaster::util::dispatch::ConnectionsHandler informing the client that the connection was lost (i.e.

when the state of the connectionsHandler has gone to DEAD).

Implements org::xmlBlaster::client::I_ConnectionProblems.

Definition at line 68 of file TestEmptyContent.cpp.

References org::xmlBlaster::util::I_Log::info().

void TestEmptyContent::reachedPolling ( StatesEnum  oldState,
I_ConnectionsHandler connectionsHandler 
) [virtual]

This is the callback method invoked from org::xmlBlaster::util::dispatch::ConnectionsHandler informing the client that the connection state has changed to POLLING.

Implements org::xmlBlaster::client::I_ConnectionProblems.

Definition at line 73 of file TestEmptyContent.cpp.

References org::xmlBlaster::util::I_Log::info().

void TestEmptyContent::execute (  ) 

Definition at line 78 of file TestEmptyContent.cpp.

References org::xmlBlaster::client::XmlBlasterAccess::connect(), org::xmlBlaster::client::XmlBlasterAccess::disconnect(), org::xmlBlaster::client::XmlBlasterAccess::erase(), org::xmlBlaster::util::I_Log::error(), org::xmlBlaster::util::I_Log::info(), org::xmlBlaster::client::XmlBlasterAccess::initFailsafe(), org::xmlBlaster::client::XmlBlasterAccess::publish(), org::xmlBlaster::client::key::PublishKey::setContentMime(), org::xmlBlaster::client::key::PublishKey::setOid(), org::xmlBlaster::client::key::UnSubscribeKey::setOid(), org::xmlBlaster::util::thread::Thread::sleep(), org::xmlBlaster::util::thread::Thread::sleepSecs(), org::xmlBlaster::client::XmlBlasterAccess::subscribe(), org::xmlBlaster::util::XmlBlasterException::toXml(), org::xmlBlaster::client::qos::PublishReturnQos::toXml(), org::xmlBlaster::util::MessageUnit::toXml(), org::xmlBlaster::client::qos::SubscribeReturnQos::toXml(), org::xmlBlaster::client::qos::UnSubscribeQos::toXml(), org::xmlBlaster::client::key::UnSubscribeKey::toXml(), and org::xmlBlaster::util::qos::ConnectQosData::toXml().

Referenced by main().

string TestEmptyContent::update ( string &  ,
UpdateKey updateKey,
unsigned char *  ,
long  ,
UpdateQos updateQos 
)

Callbacks from xmlBlaster arrive here.

Definition at line 156 of file TestEmptyContent.cpp.

References org::xmlBlaster::client::key::MsgKeyBase::getContentMime(), org::xmlBlaster::util::I_Log::info(), org::xmlBlaster::client::qos::GetReturnQos::toXml(), and org::xmlBlaster::client::key::MsgKeyBase::toXml().


The documentation for this class was generated from the following file: