Public Member Functions | |
CorbaConnection (org::xmlBlaster::util::Global &global, CORBA::ORB_ptr orb=((void *) 0)) | |
CORBA client access to xmlBlaster for normal client applications . | |
~CorbaConnection () | |
std::string | getAddress () |
std::string | getCbAddress () |
bool | orbPerformWork () |
Is used to perform work on the orb (if necessary). | |
void | run () |
Run forever. | |
void | initAuthenticationService () |
Access the authentication service. | |
org::xmlBlaster::util::qos::ConnectReturnQosRef | connect (org::xmlBlaster::util::qos::ConnectQosRef &connectQos) |
The new way to connect (i.e. | |
bool | disconnect (std::string &qos="") |
Disconnects from the xmlBlaster server (the callback server is not disconnected). | |
bool | shutdown () |
Shutdown the connection without disconnecting (xmlBlaster does not know that we have disappeared). | |
bool | shutdownCb () |
void | createCallbackServer (POA_clientIdl::BlasterCallback *implObj) |
Building a Callback server. | |
std::string & | getLoginName () |
Access the login name. | |
bool | isLoggedIn () |
| |
std::string | subscribe (std::string &xmlKey, std::string &qos=std::string("<qos/>")) |
Subscribe a message. | |
std::vector< std::string > | unSubscribe (std::string &xmlKey, std::string &qos=std::string("<qos/>")) |
std::string | publish (serverIdl::MessageUnit &msgUnit) |
std::string | publish (util::MessageUnit &msgUnitUtil) |
publish a message. | |
std::vector< std::string > | publishArr (std::vector< util::MessageUnit > &msgVec) |
Publish a bulk of messages. | |
serverIdl::XmlTypeArr * | publishArr (serverIdl::MessageUnitArr &msgUnitArr) |
void | publishOneway (std::vector< util::MessageUnit > &msgVec) |
Publish a bulk of messages without ACK. | |
void | publishOneway (serverIdl::MessageUnitArr &msgUnitArr) |
Enforced by ServerOperations interface. | |
std::vector< std::string > | erase (std::string &xmlKey, std::string &qos=std::string("<qos/>")) |
| |
std::vector< util::MessageUnit > | get (std::string &xmlKey, std::string &qos=std::string("<qos/>")) |
Access messages the synchronous way. | |
std::string | ping (std::string &qos=std::string("<qos/>")) |
Publish fault-tolerant the given message. | |
void | copyToCorba (serverIdl::MessageUnit &dest, util::MessageUnit &src) |
Transform a util::MessageUnit to the corba variant. | |
void | copyToCorba (serverIdl::MessageUnitArr_var &units, std::vector< util::MessageUnit > &msgVec) |
Transform STL std::vector to corba messageUnit array variant. | |
void | copyFromCorba (std::vector< util::MessageUnit > &vecArr, serverIdl::MessageUnitArr_var &units) |
Static Public Member Functions | |
static std::string | usage () |
Transform corba messageUnit array to vector variant. |
Definition at line 38 of file CorbaConnection.h.
org::xmlBlaster::client::protocol::corba::CorbaConnection::CorbaConnection | ( | org::xmlBlaster::util::Global & | global, | |
CORBA::ORB_ptr | orb = ((void *) 0) | |||
) |
CORBA client access to xmlBlaster for normal client applications .
arg | parameters given on command line
|
Definition at line 53 of file CorbaConnection.cpp.
References org::xmlBlaster::util::I_Log::call(), org::xmlBlaster::util::Global::getArgc(), org::xmlBlaster::util::Global::getArgs(), and org::xmlBlaster::util::I_Log::info().
org::xmlBlaster::client::protocol::corba::CorbaConnection::~CorbaConnection | ( | ) |
Definition at line 86 of file CorbaConnection.cpp.
References org::xmlBlaster::util::I_Log::call(), shutdown(), shutdownCb(), and org::xmlBlaster::util::I_Log::trace().
string org::xmlBlaster::client::protocol::corba::CorbaConnection::getAddress | ( | ) |
Definition at line 108 of file CorbaConnection.cpp.
string org::xmlBlaster::client::protocol::corba::CorbaConnection::getCbAddress | ( | ) |
Definition at line 113 of file CorbaConnection.cpp.
Referenced by org::xmlBlaster::client::protocol::corba::CorbaDriver::getCbAddress().
bool org::xmlBlaster::client::protocol::corba::CorbaConnection::orbPerformWork | ( | ) |
Is used to perform work on the orb (if necessary).
Definition at line 92 of file CorbaConnection.h.
void org::xmlBlaster::client::protocol::corba::CorbaConnection::run | ( | ) |
void org::xmlBlaster::client::protocol::corba::CorbaConnection::initAuthenticationService | ( | ) |
Access the authentication service.
There are several ways to bootstrap the authentication service:
-dispatch/connection/plugin/ior/iorString "IOR:0000..."
-dispatch/connection/plugin/ior/iorFile yourIorFile
-bootstrapHostname server.xmlBlaster.org -bootstrapPort 3412
Definition at line 127 of file CorbaConnection.cpp.
References org::xmlBlaster::util::I_Log::call(), closeSocket(), connect(), org::xmlBlaster::client::protocol::corba::CorbaDriver::convertFromCorbaException(), org::xmlBlaster::util::I_Log::dump(), org::xmlBlaster::util::I_Log::error(), org::xmlBlaster::util::Property::getBoolProperty(), org::xmlBlaster::util::Property::getIntProperty(), org::xmlBlaster::util::Global::getProperty(), org::xmlBlaster::client::protocol::corba::NameServerControl::getString(), org::xmlBlaster::util::Property::getStringProperty(), org::xmlBlaster::util::Global::getStrippedId(), org::xmlBlaster::util::I_Log::info(), org::xmlBlaster::util::lexical_cast(), org::xmlBlaster::util::I_Log::panic(), org::xmlBlaster::client::protocol::corba::NameServerControl::resolve(), shutdown(), to_string(), org::xmlBlaster::util::I_Log::trace(), and org::xmlBlaster::util::I_Log::warn().
Referenced by connect().
ConnectReturnQosRef org::xmlBlaster::client::protocol::corba::CorbaConnection::connect | ( | org::xmlBlaster::util::qos::ConnectQosRef & | connectQos | ) |
The new way to connect (i.e.
login to xmlBlaster)
Definition at line 409 of file CorbaConnection.cpp.
References org::xmlBlaster::util::I_Log::call(), corbaWStringToString(), org::xmlBlaster::util::I_Log::dump(), initAuthenticationService(), org::xmlBlaster::util::qos::ConnectQosFactory::readObject(), toCorbaWString(), org::xmlBlaster::util::qos::ConnectQosData::toXml(), org::xmlBlaster::util::I_Log::trace(), and org::xmlBlaster::util::I_Log::warn().
Referenced by org::xmlBlaster::client::protocol::corba::CorbaDriver::connect(), and initAuthenticationService().
bool org::xmlBlaster::client::protocol::corba::CorbaConnection::disconnect | ( | std::string & | qos = "" |
) |
Disconnects from the xmlBlaster server (the callback server is not disconnected).
Referenced by org::xmlBlaster::client::protocol::corba::CorbaDriver::disconnect().
bool org::xmlBlaster::client::protocol::corba::CorbaConnection::shutdown | ( | ) |
Shutdown the connection without disconnecting (xmlBlaster does not know that we have disappeared).
Definition at line 454 of file CorbaConnection.cpp.
Referenced by initAuthenticationService(), org::xmlBlaster::client::protocol::corba::CorbaDriver::shutdown(), and ~CorbaConnection().
bool org::xmlBlaster::client::protocol::corba::CorbaConnection::shutdownCb | ( | ) |
Definition at line 470 of file CorbaConnection.cpp.
Referenced by org::xmlBlaster::client::protocol::corba::CorbaDriver::shutdownCb(), and ~CorbaConnection().
void org::xmlBlaster::client::protocol::corba::CorbaConnection::createCallbackServer | ( | POA_clientIdl::BlasterCallback * | implObj | ) |
Building a Callback server.
Definition at line 376 of file CorbaConnection.cpp.
References org::xmlBlaster::util::I_Log::trace().
std::string& org::xmlBlaster::client::protocol::corba::CorbaConnection::getLoginName | ( | ) |
Access the login name.
Definition at line 185 of file CorbaConnection.h.
Referenced by org::xmlBlaster::client::protocol::corba::CorbaDriver::getLoginName().
bool org::xmlBlaster::client::protocol::corba::CorbaConnection::isLoggedIn | ( | ) |
Definition at line 193 of file CorbaConnection.h.
Referenced by org::xmlBlaster::client::protocol::corba::CorbaDriver::isLoggedIn().
std::string org::xmlBlaster::client::protocol::corba::CorbaConnection::subscribe | ( | std::string & | xmlKey, | |
std::string & | qos = std::string("<qos/>") | |||
) |
Subscribe a message.
Note: You don't need to free anything
Referenced by org::xmlBlaster::client::protocol::corba::CorbaDriver::subscribe(), and org::xmlBlaster::TestLogin::testSubscribeXPath().
std::vector<std::string> org::xmlBlaster::client::protocol::corba::CorbaConnection::unSubscribe | ( | std::string & | xmlKey, | |
std::string & | qos = std::string("<qos/>") | |||
) |
string org::xmlBlaster::client::protocol::corba::CorbaConnection::publish | ( | serverIdl::MessageUnit & | msgUnit | ) |
This is a wrapper around the raw CORBA publish() method If the server disappears you get an exception. This call will not block.
Definition at line 605 of file CorbaConnection.cpp.
References corbaWStringToString(), and org::xmlBlaster::util::I_Log::trace().
Referenced by org::xmlBlaster::client::protocol::corba::CorbaDriver::publish(), org::xmlBlaster::TestLogin::testLoginLogout(), and org::xmlBlaster::TestLogin::testPublish().
string org::xmlBlaster::client::protocol::corba::CorbaConnection::publish | ( | util::MessageUnit & | msgUnitUtil | ) |
publish a message.
This method has a common interface which is not CORBA depending. Prefer this to publish(const serverIdl::MessageUnit &msgUnit)
Note: You don't need to free anything
Definition at line 569 of file CorbaConnection.cpp.
References copyToCorba(), corbaWStringToString(), org::xmlBlaster::util::I_Log::dump(), org::xmlBlaster::util::MessageUnit::toXml(), and org::xmlBlaster::util::I_Log::trace().
std::vector<std::string> org::xmlBlaster::client::protocol::corba::CorbaConnection::publishArr | ( | std::vector< util::MessageUnit > & | msgVec | ) |
Publish a bulk of messages.
This method has a common interface which is not CORBA depending.
Note: You don't need to free anything
A | std::vector with org::xmlBlaster::util::MessageUnit |
serverIdl::XmlTypeArr * org::xmlBlaster::client::protocol::corba::CorbaConnection::publishArr | ( | serverIdl::MessageUnitArr & | msgUnitArr | ) |
Definition at line 675 of file CorbaConnection.cpp.
References org::xmlBlaster::util::I_Log::call(), serverIdl::XmlBlasterException::message, and org::xmlBlaster::util::I_Log::trace().
void org::xmlBlaster::client::protocol::corba::CorbaConnection::publishOneway | ( | std::vector< util::MessageUnit > & | msgVec | ) |
Publish a bulk of messages without ACK.
This method has a common interface which is not CORBA depending.
Note: You don't need to free anything
The | org::xmlBlaster::util::MessageUnit array as a STL std::vector |
void org::xmlBlaster::client::protocol::corba::CorbaConnection::publishOneway | ( | serverIdl::MessageUnitArr & | msgUnitArr | ) |
Enforced by ServerOperations interface.
Definition at line 736 of file CorbaConnection.cpp.
References org::xmlBlaster::util::I_Log::call(), and org::xmlBlaster::util::I_Log::error().
std::vector<std::string> org::xmlBlaster::client::protocol::corba::CorbaConnection::erase | ( | std::string & | xmlKey, | |
std::string & | qos = std::string("<qos/>") | |||
) |
Referenced by org::xmlBlaster::client::protocol::corba::CorbaDriver::erase(), and org::xmlBlaster::TestLogin::tearDown().
std::vector<util::MessageUnit> org::xmlBlaster::client::protocol::corba::CorbaConnection::get | ( | std::string & | xmlKey, | |
std::string & | qos = std::string("<qos/>") | |||
) |
Access messages the synchronous way.
Note: You don't need to free anything
Referenced by org::xmlBlaster::client::protocol::corba::CorbaDriver::get().
std::string org::xmlBlaster::client::protocol::corba::CorbaConnection::ping | ( | std::string & | qos = std::string("<qos/>") |
) |
Publish fault-tolerant the given message.
This is a wrapper around the raw CORBA publish() method If the server disappears you get an exception. This call will not block.
Enforced by ServerOperations interface (failsafe mode)
void org::xmlBlaster::client::protocol::corba::CorbaConnection::copyToCorba | ( | serverIdl::MessageUnit & | dest, | |
util::MessageUnit & | src | |||
) |
Transform a util::MessageUnit to the corba variant.
Definition at line 860 of file CorbaConnection.cpp.
References serverIdl::MessageUnit::content, org::xmlBlaster::util::MessageUnit::getContent(), org::xmlBlaster::util::MessageUnit::getContentLen(), org::xmlBlaster::util::MessageUnit::getKey(), org::xmlBlaster::util::MessageUnit::getQos(), serverIdl::MessageUnit::qos, toCorbaWString(), org::xmlBlaster::util::qos::QosData::toXml(), org::xmlBlaster::util::key::KeyData::toXml(), and serverIdl::MessageUnit::xmlKey.
Referenced by publish().
void org::xmlBlaster::client::protocol::corba::CorbaConnection::copyToCorba | ( | serverIdl::MessageUnitArr_var & | units, | |
std::vector< util::MessageUnit > & | msgVec | |||
) |
Transform STL std::vector to corba messageUnit array variant.
void org::xmlBlaster::client::protocol::corba::CorbaConnection::copyFromCorba | ( | std::vector< util::MessageUnit > & | vecArr, | |
serverIdl::MessageUnitArr_var & | units | |||
) |
std::string org::xmlBlaster::client::protocol::corba::CorbaConnection::usage | ( | ) | [static] |
Transform corba messageUnit array to vector variant.
These variables may be set in xmlBlaster.properties as well. Don't use the "-" prefix there.
Definition at line 927 of file CorbaConnection.cpp.
Referenced by org::xmlBlaster::client::protocol::corba::CorbaDriver::usage().