org::xmlBlaster::client::protocol::socket::SocketDriver Class Reference

Inheritance diagram for org::xmlBlaster::client::protocol::socket::SocketDriver:

Inheritance graph
[legend]
Collaboration diagram for org::xmlBlaster::client::protocol::socket::SocketDriver:

Collaboration graph
[legend]
List of all members.

Public Member Functions

void initialize (std::string &name, org::xmlBlaster::client::I_Callback &client)
 Initialize and start the callback server.
std::string getCbProtocol ()
 Returns the 'well known' protocol type.
std::string getCbAddress ()
 Returns the current callback address.
org::xmlBlaster::util::I_LoggetLog ()
I_CallbackgetCallbackClient ()
 
Returns:
0 if the client has not registered its update()

bool shutdownCb ()
 Stop the server.
org::xmlBlaster::util::qos::ConnectReturnQosRef connect (org::xmlBlaster::util::qos::ConnectQosRef &qos)
 connect() is a login or authentication as well, the authentication schema is transported in the qos.
bool disconnect (org::xmlBlaster::util::qos::DisconnectQos &qos)
 Logout from xmlBlaster.
std::string getProtocol ()
 
Returns:
The connection protocol name "IOR" or "SOCKET" etc.

bool shutdown ()
 Called when going to POLLING mode.
std::string getLoginName ()
bool isLoggedIn ()
std::string ping (std::string &qos)
org::xmlBlaster::client::qos::SubscribeReturnQos subscribe (org::xmlBlaster::client::key::SubscribeKey &key, org::xmlBlaster::client::qos::SubscribeQos &qos)
std::vector< org::xmlBlaster::util::MessageUnitget (org::xmlBlaster::client::key::GetKey &key, org::xmlBlaster::client::qos::GetQos &qos)
std::vector< org::xmlBlaster::client::qos::UnSubscribeReturnQosunSubscribe (org::xmlBlaster::client::key::UnSubscribeKey &key, org::xmlBlaster::client::qos::UnSubscribeQos &qos)
org::xmlBlaster::client::qos::PublishReturnQos publish (org::xmlBlaster::util::MessageUnit &msgUnit)
void publishOneway (std::vector< org::xmlBlaster::util::MessageUnit > &msgUnitArr)
std::vector< org::xmlBlaster::client::qos::PublishReturnQospublishArr (std::vector< org::xmlBlaster::util::MessageUnit > &msgUnitArr)
std::vector< org::xmlBlaster::client::qos::EraseReturnQoserase (org::xmlBlaster::client::key::EraseKey &key, org::xmlBlaster::client::qos::EraseQos &qos)
std::string & me ()
org::xmlBlaster::util::GlobalgetGlobal ()
org::xmlBlaster::util::I_LoggetLog ()
org::xmlBlaster::util::key::MsgKeyFactorygetMsgKeyFactory ()
org::xmlBlaster::util::qos::MsgQosFactorygetMsgQosFactory ()
org::xmlBlaster::util::XmlBlasterException convertFromSocketException (struct::ExceptionStruct &ex)
std::string getType ()
 Get the name of the plugin.
std::string getVersion ()
 Get the version of the plugin.
org::xmlBlaster::client::protocol::I_ProgressListenerregisterProgressListener (org::xmlBlaster::client::protocol::I_ProgressListener *listener)
 
See also:
org::xmlBlaster::client::protocol::I_CallbackServer::registerProgressListener


Static Public Member Functions

static std::string usage ()
static struct::ExceptionStruct convertToSocketException (org::xmlBlaster::util::XmlBlasterException &ex)

Public Attributes

org::xmlBlaster::client::protocol::I_ProgressListenerprogressListener_

Friends

class SocketDriverFactory

Detailed Description

Definition at line 40 of file SocketDriver.h.


Member Function Documentation

void org::xmlBlaster::client::protocol::socket::SocketDriver::initialize ( std::string &  name,
org::xmlBlaster::client::I_Callback client 
) [virtual]

Initialize and start the callback server.

This is guaranteed to be invoked after the default constructor.

Parameters:
glob The global handle with your environment settings
name The login name of the client, for logging only
client Your implementation to receive the callback messages from xmlBlaster

Implements org::xmlBlaster::client::protocol::I_CallbackServer.

string org::xmlBlaster::client::protocol::socket::SocketDriver::getCbProtocol (  )  [virtual]

Returns the 'well known' protocol type.

Returns:
E.g. "RMI", "SOCKET", "XMLRPC"

Implements org::xmlBlaster::client::protocol::I_CallbackServer.

Definition at line 411 of file SocketDriver.cpp.

References org::xmlBlaster::util::Constants::SOCKET.

string org::xmlBlaster::client::protocol::socket::SocketDriver::getCbAddress (  )  [virtual]

Returns the current callback address.

Returns:
"rmi://develop.MarcelRuff.info:1099/xmlBlasterCB", "127.128.2.1:7607", "http://XMLRPC" or null if not known

Implements org::xmlBlaster::client::protocol::I_CallbackServer.

Definition at line 416 of file SocketDriver.cpp.

References XmlBlasterAccessUnparsed::callbackP, catch_MACRO, and org::xmlBlaster::util::lexical_cast().

org::xmlBlaster::util::I_Log& org::xmlBlaster::client::protocol::socket::SocketDriver::getLog (  ) 

Definition at line 95 of file SocketDriver.h.

I_Callback * org::xmlBlaster::client::protocol::socket::SocketDriver::getCallbackClient (  ) 

Returns:
0 if the client has not registered its update()

Definition at line 382 of file SocketDriver.cpp.

int org::xmlBlaster::client::protocol::socket::SocketDriver::shutdownCb (  )  [virtual]

Stop the server.

Returns:
true if everything went fine.

Implements org::xmlBlaster::client::protocol::I_CallbackServer.

Definition at line 428 of file SocketDriver.cpp.

References XmlBlasterAccessUnparsed::callbackP.

ConnectReturnQosRef org::xmlBlaster::client::protocol::socket::SocketDriver::connect ( org::xmlBlaster::util::qos::ConnectQosRef qos  )  [virtual]

connect() is a login or authentication as well, the authentication schema is transported in the qos.

Parameters:
qos The authentication and other informations
client A handle to your callback if desired or null
Returns:
org::xmlBlaster::util::qos::ConnectReturnQos

Implements org::xmlBlaster::client::protocol::I_XmlBlasterConnection.

Definition at line 436 of file SocketDriver.cpp.

References org::xmlBlaster::util::I_Log::call(), XmlBlasterAccessUnparsed::callbackP, catch_MACRO, XmlBlasterAccessUnparsed::connect, org::xmlBlaster::util::qos::storage::CbQueueProperty::getCurrentCallbackAddress(), org::xmlBlaster::util::qos::ConnectQosData::getSessionCbQueueProperty(), org::xmlBlaster::util::lexical_cast(), org::xmlBlaster::util::qos::ConnectQosFactory::readObject(), org::xmlBlaster::util::Constants::SOCKET, and org::xmlBlaster::util::I_Log::trace().

int org::xmlBlaster::client::protocol::socket::SocketDriver::disconnect ( org::xmlBlaster::util::qos::DisconnectQos qos  )  [virtual]

Logout from xmlBlaster.

Parameters:
qos The QoS or null

Implements org::xmlBlaster::client::protocol::I_XmlBlasterConnection.

Definition at line 475 of file SocketDriver.cpp.

References org::xmlBlaster::util::I_Log::call(), catch_MACRO, XmlBlasterAccessUnparsed::disconnect, and org::xmlBlaster::util::qos::DisconnectQos::toXml().

string org::xmlBlaster::client::protocol::socket::SocketDriver::getProtocol (  )  [virtual]

Returns:
The connection protocol name "IOR" or "SOCKET" etc.

Implements org::xmlBlaster::client::protocol::I_XmlBlasterConnection.

Definition at line 491 of file SocketDriver.cpp.

References org::xmlBlaster::util::Constants::SOCKET.

int org::xmlBlaster::client::protocol::socket::SocketDriver::shutdown (  )  [virtual]

Called when going to POLLING mode.

Implements org::xmlBlaster::client::protocol::I_XmlBlasterConnection.

Definition at line 497 of file SocketDriver.cpp.

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

string org::xmlBlaster::client::protocol::socket::SocketDriver::getLoginName (  )  [virtual]

Implements org::xmlBlaster::client::protocol::I_XmlBlasterConnection.

Definition at line 506 of file SocketDriver.cpp.

int org::xmlBlaster::client::protocol::socket::SocketDriver::isLoggedIn (  )  [virtual]

Implements org::xmlBlaster::client::protocol::I_XmlBlasterConnection.

Definition at line 511 of file SocketDriver.cpp.

References XmlBlasterAccessUnparsed::isConnected.

std::string org::xmlBlaster::client::protocol::socket::SocketDriver::ping ( std::string &  qos  )  [virtual]

Implements org::xmlBlaster::client::protocol::I_XmlBlasterConnection.

SubscribeReturnQos org::xmlBlaster::client::protocol::socket::SocketDriver::subscribe ( org::xmlBlaster::client::key::SubscribeKey key,
org::xmlBlaster::client::qos::SubscribeQos qos 
) [virtual]

Implements org::xmlBlaster::client::protocol::I_XmlBlasterConnection.

Definition at line 536 of file SocketDriver.cpp.

References catch_MACRO, org::xmlBlaster::util::COMMUNICATION_NOCONNECTION, org::xmlBlaster::util::qos::StatusQosFactory::readObject(), XmlBlasterAccessUnparsed::subscribe, org::xmlBlaster::client::qos::UnSubscribeQos::toXml(), and org::xmlBlaster::client::key::UnSubscribeKey::toXml().

vector< MessageUnit > org::xmlBlaster::client::protocol::socket::SocketDriver::get ( org::xmlBlaster::client::key::GetKey key,
org::xmlBlaster::client::qos::GetQos qos 
) [virtual]

Implements org::xmlBlaster::client::protocol::I_XmlBlasterConnection.

Definition at line 554 of file SocketDriver.cpp.

References catch_MACRO, org::xmlBlaster::util::COMMUNICATION_NOCONNECTION, XmlBlasterAccessUnparsed::get, org::xmlBlaster::util::qos::MsgQosFactory::readObject(), org::xmlBlaster::util::key::MsgKeyFactory::readObject(), org::xmlBlaster::client::qos::UnSubscribeQos::toXml(), and org::xmlBlaster::client::key::UnSubscribeKey::toXml().

vector< UnSubscribeReturnQos > org::xmlBlaster::client::protocol::socket::SocketDriver::unSubscribe ( org::xmlBlaster::client::key::UnSubscribeKey key,
org::xmlBlaster::client::qos::UnSubscribeQos qos 
) [virtual]

Implements org::xmlBlaster::client::protocol::I_XmlBlasterConnection.

Definition at line 588 of file SocketDriver.cpp.

References catch_MACRO, org::xmlBlaster::util::COMMUNICATION_NOCONNECTION, org::xmlBlaster::util::qos::StatusQosFactory::readObject(), org::xmlBlaster::client::qos::UnSubscribeQos::toXml(), org::xmlBlaster::client::key::UnSubscribeKey::toXml(), and XmlBlasterAccessUnparsed::unSubscribe.

PublishReturnQos org::xmlBlaster::client::protocol::socket::SocketDriver::publish ( org::xmlBlaster::util::MessageUnit msgUnit  )  [virtual]

Implements org::xmlBlaster::client::protocol::I_XmlBlasterConnection.

Definition at line 610 of file SocketDriver.cpp.

References org::xmlBlaster::util::I_Log::call(), catch_MACRO, org::xmlBlaster::util::COMMUNICATION_NOCONNECTION, org::xmlBlaster::util::MessageUnit::getContent(), org::xmlBlaster::util::MessageUnit::getContentLen(), org::xmlBlaster::util::MessageUnit::getKey(), org::xmlBlaster::util::MessageUnit::getQos(), XmlBlasterAccessUnparsed::publish, org::xmlBlaster::util::qos::StatusQosFactory::readObject(), org::xmlBlaster::util::qos::QosData::toXml(), org::xmlBlaster::util::key::KeyData::toXml(), and org::xmlBlaster::util::I_Log::trace().

void org::xmlBlaster::client::protocol::socket::SocketDriver::publishOneway ( std::vector< org::xmlBlaster::util::MessageUnit > &  msgUnitArr  )  [virtual]

Implements org::xmlBlaster::client::protocol::I_XmlBlasterConnection.

std::vector<org::xmlBlaster::client::qos::PublishReturnQos> org::xmlBlaster::client::protocol::socket::SocketDriver::publishArr ( std::vector< org::xmlBlaster::util::MessageUnit > &  msgUnitArr  )  [virtual]

Implements org::xmlBlaster::client::protocol::I_XmlBlasterConnection.

vector< EraseReturnQos > org::xmlBlaster::client::protocol::socket::SocketDriver::erase ( org::xmlBlaster::client::key::EraseKey key,
org::xmlBlaster::client::qos::EraseQos qos 
) [virtual]

Implements org::xmlBlaster::client::protocol::I_XmlBlasterConnection.

Definition at line 730 of file SocketDriver.cpp.

References catch_MACRO, org::xmlBlaster::util::COMMUNICATION_NOCONNECTION, XmlBlasterAccessUnparsed::erase, and org::xmlBlaster::util::qos::StatusQosFactory::readObject().

std::string& org::xmlBlaster::client::protocol::socket::SocketDriver::me (  ) 

Definition at line 132 of file SocketDriver.h.

org::xmlBlaster::util::Global& org::xmlBlaster::client::protocol::socket::SocketDriver::getGlobal (  ) 

Definition at line 133 of file SocketDriver.h.

org::xmlBlaster::util::I_Log& org::xmlBlaster::client::protocol::socket::SocketDriver::getLog (  ) 

Definition at line 134 of file SocketDriver.h.

org::xmlBlaster::util::key::MsgKeyFactory& org::xmlBlaster::client::protocol::socket::SocketDriver::getMsgKeyFactory (  ) 

Definition at line 135 of file SocketDriver.h.

org::xmlBlaster::util::qos::MsgQosFactory& org::xmlBlaster::client::protocol::socket::SocketDriver::getMsgQosFactory (  ) 

Definition at line 136 of file SocketDriver.h.

string org::xmlBlaster::client::protocol::socket::SocketDriver::usage (  )  [static]

Definition at line 767 of file SocketDriver.cpp.

References xmlBlasterAccessUnparsedUsage().

Referenced by org::xmlBlaster::util::Global::usage().

org::xmlBlaster::util::XmlBlasterException org::xmlBlaster::client::protocol::socket::SocketDriver::convertFromSocketException ( struct::ExceptionStruct &  ex  ) 

ExceptionStruct org::xmlBlaster::client::protocol::socket::SocketDriver::convertToSocketException ( org::xmlBlaster::util::XmlBlasterException ex  )  [static]

Definition at line 789 of file SocketDriver.cpp.

References org::xmlBlaster::util::XmlBlasterException::getErrorCodeStr(), and org::xmlBlaster::util::XmlBlasterException::getMessage().

std::string org::xmlBlaster::client::protocol::socket::SocketDriver::getType (  )  [virtual]

Get the name of the plugin.

Returns:
"SOCKET" I_Plugin

Implements org::xmlBlaster::util::plugin::I_Plugin.

Definition at line 151 of file SocketDriver.h.

References org::xmlBlaster::util::Constants::SOCKET.

std::string org::xmlBlaster::client::protocol::socket::SocketDriver::getVersion (  )  [virtual]

Get the version of the plugin.

Returns:
"1.0" I_Plugin

Implements org::xmlBlaster::util::plugin::I_Plugin.

Definition at line 158 of file SocketDriver.h.

I_ProgressListener * org::xmlBlaster::client::protocol::socket::SocketDriver::registerProgressListener ( org::xmlBlaster::client::protocol::I_ProgressListener listener  )  [virtual]

See also:
org::xmlBlaster::client::protocol::I_CallbackServer::registerProgressListener

Implements org::xmlBlaster::client::protocol::I_CallbackServer.

Definition at line 752 of file SocketDriver.cpp.

References XmlBlasterAccessUnparsed::callbackP, and progressListener_.


Friends And Related Function Documentation

friend class SocketDriverFactory [friend]

Definition at line 45 of file SocketDriver.h.


Member Data Documentation

org::xmlBlaster::client::protocol::I_ProgressListener* org::xmlBlaster::client::protocol::socket::SocketDriver::progressListener_

Definition at line 88 of file SocketDriver.h.

Referenced by registerProgressListener().


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