org::xmlBlaster::test::TestFailsafe Class Reference

Inheritance diagram for org::xmlBlaster::test::TestFailsafe:

Inheritance graph
[legend]
Collaboration diagram for org::xmlBlaster::test::TestFailsafe:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 TestFailsafe (int args, char **argv)
virtual ~TestFailsafe ()
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.
AddressBaseRef getAddress ()
void setUp ()
void testReconnect ()
 This test does the following:
  • tears down , i.e.

void testFailsafe ()
void tearDown ()
string update (string &sessionId, UpdateKey &updateKey, unsigned char *content, long contentSize, UpdateQos &updateQos)

Detailed Description

Definition at line 22 of file TestFailsafe.cpp.


Constructor & Destructor Documentation

org::xmlBlaster::test::TestFailsafe::TestFailsafe ( int  args,
char **  argv 
)

Definition at line 37 of file TestFailsafe.cpp.

References org::xmlBlaster::test::TestSuite::global_, and org::xmlBlaster::util::SessionName::useSessionMarker().

virtual org::xmlBlaster::test::TestFailsafe::~TestFailsafe (  )  [virtual]

Definition at line 55 of file TestFailsafe.cpp.

References org::xmlBlaster::util::I_Log::call(), org::xmlBlaster::test::TestSuite::log_, org::xmlBlaster::test::TestSuite::ME, and org::xmlBlaster::util::I_Log::trace().


Member Function Documentation

bool org::xmlBlaster::test::TestFailsafe::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 67 of file TestFailsafe.cpp.

References org::xmlBlaster::util::I_Log::info(), org::xmlBlaster::test::TestSuite::log_, and org::xmlBlaster::test::TestSuite::ME.

void org::xmlBlaster::test::TestFailsafe::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 74 of file TestFailsafe.cpp.

References org::xmlBlaster::util::I_Log::info(), org::xmlBlaster::test::TestSuite::log_, and org::xmlBlaster::test::TestSuite::ME.

void org::xmlBlaster::test::TestFailsafe::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 80 of file TestFailsafe.cpp.

References org::xmlBlaster::util::I_Log::info(), org::xmlBlaster::test::TestSuite::log_, and org::xmlBlaster::test::TestSuite::ME.

AddressBaseRef org::xmlBlaster::test::TestFailsafe::getAddress (  ) 

Definition at line 86 of file TestFailsafe.cpp.

References org::xmlBlaster::test::TestSuite::global_.

Referenced by setUp(), and testReconnect().

void org::xmlBlaster::test::TestFailsafe::setUp (  )  [virtual]

Reimplemented from org::xmlBlaster::test::TestSuite.

Definition at line 93 of file TestFailsafe.cpp.

References org::xmlBlaster::client::XmlBlasterAccess::connect(), org::xmlBlaster::test::TestSuite::connection_, org::xmlBlaster::util::I_Log::error(), getAddress(), org::xmlBlaster::test::TestSuite::global_, org::xmlBlaster::util::I_Log::info(), org::xmlBlaster::client::XmlBlasterAccess::initFailsafe(), org::xmlBlaster::test::TestSuite::log_, org::xmlBlaster::test::TestSuite::ME, org::xmlBlaster::util::qos::ConnectQosData::setAddress(), org::xmlBlaster::client::key::UnSubscribeKey::setOid(), org::xmlBlaster::test::TestSuite::setUp(), org::xmlBlaster::client::XmlBlasterAccess::subscribe(), org::xmlBlaster::util::XmlBlasterException::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(), and testReconnect().

void org::xmlBlaster::test::TestFailsafe::testReconnect (  ) 

This test does the following:

it erases the message 'TestFailsafe' and disconnects.

Definition at line 128 of file TestFailsafe.cpp.

References org::xmlBlaster::test::assertEquals(), org::xmlBlaster::client::XmlBlasterAccess::connect(), org::xmlBlaster::test::TestSuite::connection_, org::xmlBlaster::client::XmlBlasterAccess::disconnect(), org::xmlBlaster::util::I_Log::error(), getAddress(), org::xmlBlaster::util::qos::SessionQosData::getRelativeName(), org::xmlBlaster::util::qos::ConnectQosData::getSessionQos(), org::xmlBlaster::test::TestSuite::global_, org::xmlBlaster::util::I_Log::info(), org::xmlBlaster::client::XmlBlasterAccess::isAlive(), org::xmlBlaster::test::TestSuite::log_, org::xmlBlaster::test::TestSuite::ME, org::xmlBlaster::client::XmlBlasterAccess::publish(), org::xmlBlaster::util::qos::ConnectQosData::setAddress(), org::xmlBlaster::client::key::PublishKey::setOid(), org::xmlBlaster::client::key::UnSubscribeKey::setOid(), org::xmlBlaster::util::qos::ConnectQosData::setSessionQos(), setUp(), org::xmlBlaster::util::thread::Thread::sleep(), org::xmlBlaster::util::thread::Thread::sleepSecs(), org::xmlBlaster::test::TestSuite::startEmbeddedServer(), org::xmlBlaster::test::TestSuite::stopEmbeddedServer(), org::xmlBlaster::client::XmlBlasterAccess::subscribe(), tearDown(), org::xmlBlaster::util::XmlBlasterException::toString(), org::xmlBlaster::util::XmlBlasterException::toXml(), org::xmlBlaster::test::TestSuite::useEmbeddedServer_, and org::xmlBlaster::util::waitOnKeyboardHit().

Referenced by main().

void org::xmlBlaster::test::TestFailsafe::testFailsafe (  ) 

Definition at line 261 of file TestFailsafe.cpp.

References org::xmlBlaster::test::TestSuite::connection_, org::xmlBlaster::util::I_Log::error(), org::xmlBlaster::test::TestSuite::global_, org::xmlBlaster::util::I_Log::info(), org::xmlBlaster::test::TestSuite::log_, org::xmlBlaster::test::TestSuite::ME, org::xmlBlaster::client::XmlBlasterAccess::publish(), org::xmlBlaster::client::key::PublishKey::setOid(), org::xmlBlaster::util::thread::Thread::sleep(), org::xmlBlaster::util::thread::Thread::sleepSecs(), org::xmlBlaster::test::TestSuite::startEmbeddedServer(), org::xmlBlaster::test::TestSuite::stopEmbeddedServer(), and org::xmlBlaster::util::XmlBlasterException::toXml().

void org::xmlBlaster::test::TestFailsafe::tearDown (  )  [virtual]

Reimplemented from org::xmlBlaster::test::TestSuite.

Definition at line 301 of file TestFailsafe.cpp.

References org::xmlBlaster::test::TestSuite::connection_, org::xmlBlaster::client::XmlBlasterAccess::disconnect(), org::xmlBlaster::client::XmlBlasterAccess::erase(), org::xmlBlaster::util::I_Log::error(), org::xmlBlaster::test::TestSuite::global_, org::xmlBlaster::util::I_Log::info(), org::xmlBlaster::test::TestSuite::log_, org::xmlBlaster::test::TestSuite::ME, org::xmlBlaster::client::key::UnSubscribeKey::setOid(), org::xmlBlaster::test::TestSuite::tearDown(), org::xmlBlaster::util::XmlBlasterException::toXml(), org::xmlBlaster::client::qos::UnSubscribeQos::toXml(), and org::xmlBlaster::client::key::UnSubscribeKey::toXml().

Referenced by main(), and testReconnect().

string org::xmlBlaster::test::TestFailsafe::update ( string &  sessionId,
UpdateKey updateKey,
unsigned char *  content,
long  contentSize,
UpdateQos updateQos 
)

Definition at line 334 of file TestFailsafe.cpp.

References org::xmlBlaster::test::assertEquals(), org::xmlBlaster::client::qos::GetReturnQos::getState(), org::xmlBlaster::test::TestSuite::log_, org::xmlBlaster::test::TestSuite::ME, org::xmlBlaster::client::qos::GetReturnQos::toXml(), org::xmlBlaster::client::key::MsgKeyBase::toXml(), and org::xmlBlaster::util::I_Log::trace().


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