org::xmlBlaster::client::protocol::corba::CorbaConnection Class Reference

Collaboration diagram for org::xmlBlaster::client::protocol::corba::CorbaConnection:

Collaboration graph
[legend]
List of all members.

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 ()
 
Returns:
true if you are logged in

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::XmlTypeArrpublishArr (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/>"))
 
See also:
xmlBlaster.idl

std::vector< util::MessageUnitget (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.

Detailed Description

Definition at line 38 of file CorbaConnection.h.


Constructor & Destructor Documentation

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 .

Parameters:
arg parameters given on command line
  • -dispatch/connection/plugin/ior/iorString IOR std::string is directly given
  • -dispatch/connection/plugin/ior/iorFile IOR std::string is given through a file
  • -bootstrapHostname host name or IP where xmlBlaster is running
  • -bootstrapPort where the internal xmlBlaster-http server publishes its IOR (defaults to 3412)
  • -dispatch/connection/plugin/ior/useNameService true/false, if a naming service shall be used

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().


Member Function Documentation

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).

Returns:
true if some work was done

Definition at line 92 of file CorbaConnection.h.

void org::xmlBlaster::client::protocol::corba::CorbaConnection::run (  ) 

Run forever.

Definition at line 106 of file CorbaConnection.h.

void org::xmlBlaster::client::protocol::corba::CorbaConnection::initAuthenticationService (  ) 

Access the authentication service.

There are several ways to bootstrap the authentication service:

Returns:
a handle on the AuthServer IDL interface

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.

Returns:
the BlasterCallback 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.

Returns:
your login name or null if you are not logged in

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 (  ) 

Returns:
true if you are logged in

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

Returns:
The xml based QoS

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/>") 
)

Referenced by org::xmlBlaster::client::protocol::corba::CorbaDriver::unSubscribe().

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.

See also:
xmlBlaster.idl
Deprecated:
Please use the util::MessageUnit variant

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

Returns:
The xml based QoS

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

Parameters:
A std::vector with org::xmlBlaster::util::MessageUnit
Returns:
A std::vector of std::strings each is a publish return QoS.
See also:
xmlBlaster.idl

serverIdl::XmlTypeArr * org::xmlBlaster::client::protocol::corba::CorbaConnection::publishArr ( serverIdl::MessageUnitArr msgUnitArr  ) 

Deprecated:
Please use the STL std::vector variant

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

Parameters:
The org::xmlBlaster::util::MessageUnit array as a STL std::vector
See also:
xmlBlaster.idl

void org::xmlBlaster::client::protocol::corba::CorbaConnection::publishOneway ( serverIdl::MessageUnitArr msgUnitArr  ) 

Enforced by ServerOperations interface.

See also:
xmlBlaster.idl
Deprecated:
Use the std::vector<util::MessageUnit> variant

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/>") 
)

See also:
xmlBlaster.idl

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

Returns:
The STL org::xmlBlaster::util::MessageUnit std::vector, its a copy so if you have the variable on the stack it will free itself
See also:
xmlBlaster.idl

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)

See also:
xmlBlaster.idl

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().


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