


Public Member Functions | |
| TestSub (int args, char *argc[], string &loginName) | |
| Constructs the TestSub object. | |
| virtual | ~TestSub () |
| void | setUp () |
| Sets up the fixture. | |
| void | tearDown () |
| Tears down the fixture. | |
| void | testSubscribeXPath () |
| TEST: Subscribe to messages with XPATH. | |
| void | testSubscribeSpecificCallback () |
| TEST: Subscribe to messages with specific callback. | |
| void | testPublishCorbaMethods (TestType testType) |
| TEST: Construct a message and publish it. | |
| void | testPublishSTLMethods (TestType testType) |
| TEST: Construct a message and publish it. | |
| void | testPublishAfterSubscribeXPath () |
| TEST: Construct a message and publish it, the previous XPath subscription should match and send an update. | |
| string | update (string &sessionId, UpdateKey &updateKey, unsigned char *content, long contentSize, UpdateQos &updateQos) |
| This is the callback method (I_Callback) invoked from XmlBlasterAccess informing the client in an asynchronous mode about a new message. | |
Definition at line 64 of file TestSub.cpp.
| org::xmlBlaster::test::TestSub::TestSub | ( | int | args, | |
| char * | argc[], | |||
| string & | loginName | |||
| ) |
Constructs the TestSub object.
| testName | The name used in the test suite | |
| loginName | The name to login to the xmlBlaster |
Definition at line 93 of file TestSub.cpp.
References org::xmlBlaster::test::TestSuite::log_.
| virtual org::xmlBlaster::test::TestSub::~TestSub | ( | ) | [virtual] |
Definition at line 108 of file TestSub.cpp.
| void org::xmlBlaster::test::TestSub::setUp | ( | ) | [virtual] |
Sets up the fixture.
Connect to xmlBlaster and login
Reimplemented from org::xmlBlaster::test::TestSuite.
Definition at line 119 of file TestSub.cpp.
References org::xmlBlaster::test::assertEquals(), org::xmlBlaster::client::XmlBlasterAccess::connect(), org::xmlBlaster::test::TestSuite::connection_, org::xmlBlaster::util::I_Log::error(), org::xmlBlaster::util::qos::SessionQosData::getAbsoluteName(), org::xmlBlaster::util::Global::getBuildTimestamp(), org::xmlBlaster::util::qos::ConnectQosData::getSessionQos(), org::xmlBlaster::util::qos::ConnectQosData::getSessionQosRef(), org::xmlBlaster::util::Global::getVersion(), org::xmlBlaster::test::TestSuite::global_, org::xmlBlaster::util::I_Log::info(), org::xmlBlaster::test::TestSuite::log_, org::xmlBlaster::test::TestSuite::ME, org::xmlBlaster::test::TestSuite::setUp(), and org::xmlBlaster::util::XmlBlasterException::toXml().
Referenced by main().
| void org::xmlBlaster::test::TestSub::tearDown | ( | ) | [virtual] |
Tears down the fixture.
cleaning up .... erase() the previous message OID and logout
Reimplemented from org::xmlBlaster::test::TestSuite.
Definition at line 148 of file TestSub.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(), and org::xmlBlaster::util::XmlBlasterException::toXml().
Referenced by main().
| void org::xmlBlaster::test::TestSub::testSubscribeXPath | ( | ) |
TEST: Subscribe to messages with XPATH.
The returned subscribeOid is checked
Definition at line 175 of file TestSub.cpp.
References org::xmlBlaster::test::TestSuite::connection_, org::xmlBlaster::client::qos::SubscribeReturnQos::getSubscriptionId(), 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::setQueryString(), org::xmlBlaster::client::XmlBlasterAccess::subscribe(), org::xmlBlaster::util::XmlBlasterException::toXml(), org::xmlBlaster::util::I_Log::trace(), and org::xmlBlaster::util::I_Log::warn().
Referenced by testPublishAfterSubscribeXPath().
| void org::xmlBlaster::test::TestSub::testSubscribeSpecificCallback | ( | ) |
TEST: Subscribe to messages with specific callback.
Definition at line 207 of file TestSub.cpp.
References org::xmlBlaster::test::assertEquals(), org::xmlBlaster::test::TestSuite::connection_, org::xmlBlaster::test::SpecificCallback::getCount(), org::xmlBlaster::client::qos::SubscribeReturnQos::getSubscriptionId(), 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::client::XmlBlasterAccess::subscribe(), org::xmlBlaster::util::XmlBlasterException::toXml(), org::xmlBlaster::util::I_Log::trace(), org::xmlBlaster::client::XmlBlasterAccess::unSubscribe(), and org::xmlBlaster::util::I_Log::warn().
Referenced by main().
| void org::xmlBlaster::test::TestSub::testPublishCorbaMethods | ( | TestType | testType | ) |
TEST: Construct a message and publish it.
The returned publishOid is checked
Definition at line 286 of file TestSub.cpp.
References org::xmlBlaster::test::TestSuite::connection_, org::xmlBlaster::util::I_Log::error(), org::xmlBlaster::client::qos::PublishReturnQos::getKeyOid(), 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::XmlBlasterAccess::publishArr(), org::xmlBlaster::client::XmlBlasterAccess::publishOneway(), org::xmlBlaster::client::key::PublishKey::setClientTags(), org::xmlBlaster::client::key::PublishKey::setContentMime(), org::xmlBlaster::client::key::PublishKey::setContentMimeExtended(), org::xmlBlaster::client::key::PublishKey::setOid(), org::xmlBlaster::util::XmlBlasterException::toXml(), org::xmlBlaster::util::I_Log::trace(), and org::xmlBlaster::util::I_Log::warn().
| void org::xmlBlaster::test::TestSub::testPublishSTLMethods | ( | TestType | testType | ) |
TEST: Construct a message and publish it.
The returned publishOid is checked
Definition at line 338 of file TestSub.cpp.
References org::xmlBlaster::test::TestSuite::connection_, org::xmlBlaster::client::qos::PublishReturnQos::getKeyOid(), 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::XmlBlasterAccess::publishArr(), org::xmlBlaster::client::XmlBlasterAccess::publishOneway(), org::xmlBlaster::client::key::PublishKey::setClientTags(), org::xmlBlaster::util::XmlBlasterException::toXml(), org::xmlBlaster::util::I_Log::trace(), and org::xmlBlaster::util::I_Log::warn().
Referenced by testPublishAfterSubscribeXPath().
| void org::xmlBlaster::test::TestSub::testPublishAfterSubscribeXPath | ( | ) |
TEST: Construct a message and publish it,
the previous XPath subscription should match and send an update.
Definition at line 382 of file TestSub.cpp.
References org::xmlBlaster::util::I_Log::error(), org::xmlBlaster::test::TestSuite::log_, org::xmlBlaster::test::TestSuite::ME, testPublishSTLMethods(), and testSubscribeXPath().
Referenced by main().
| string org::xmlBlaster::test::TestSub::update | ( | string & | sessionId, | |
| UpdateKey & | updateKey, | |||
| unsigned char * | content, | |||
| long | contentSize, | |||
| UpdateQos & | updateQos | |||
| ) |
This is the callback method (I_Callback) invoked from XmlBlasterAccess informing the client in an asynchronous mode about a new message.
The raw CORBA-BlasterCallback.update() is unpacked and for each arrived message this update is called.
| sessionId | The sessionId to authenticate the callback This sessionId was passed on subscription we can use it to decide if we trust this update() | |
| updateKey | The arrived key | |
| content | The arrived message content | |
| qos | Quality of Service of the MessageUnit |
Definition at line 464 of file TestSub.cpp.
References org::xmlBlaster::util::I_Log::error(), org::xmlBlaster::util::qos::SessionQosData::getAbsoluteName(), org::xmlBlaster::client::key::MsgKeyBase::getContentMime(), org::xmlBlaster::client::key::MsgKeyBase::getContentMimeExtended(), org::xmlBlaster::client::key::MsgKeyBase::getOid(), org::xmlBlaster::client::qos::GetReturnQos::getSender(), org::xmlBlaster::util::qos::ConnectQosData::getSessionQos(), org::xmlBlaster::client::qos::GetReturnQos::getState(), org::xmlBlaster::client::qos::UpdateQos::getSubscriptionId(), org::xmlBlaster::util::I_Log::info(), org::xmlBlaster::test::TestSuite::log_, org::xmlBlaster::test::TestSuite::ME, org::xmlBlaster::util::Constants::STATE_ERASED, and org::xmlBlaster::util::Constants::STATE_OK.