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

Example for a callback implementation. More...

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

Collaboration graph
List of all members.

Public Member Functions

 DefaultCallback (org::xmlBlaster::util::Global &global, std::string &name="", org::xmlBlaster::client::I_Callback *boss=0, void *=0)
 Construct a persistently named object.
 DefaultCallback (DefaultCallback &el)
DefaultCallbackoperator= (DefaultCallback &el)
 ~DefaultCallback ()
serverIdl::XmlTypeArrupdate (char *sessionId, serverIdl::MessageUnitArr &msgUnitArr) UPDATE_THROW_SPECIFIER
 This is the callback method invoked from the server informing the client in an asynchronous mode about new messages.
void updateOneway (char *sessionId, serverIdl::MessageUnitArr &msgUnitArr) PING_THROW_SPECIFIER
 This is the oneway variant, not returning a value (no application level ACK).
char * ping (char *qos) PING_THROW_SPECIFIER
 Check the callback server.

Protected Attributes

org::xmlBlaster::util::key::MsgKeyFactory msgKeyFactory_
org::xmlBlaster::util::qos::MsgQosFactory msgQosFactory_

Detailed Description

Example for a callback implementation.

You can use this default callback handling with your clients, but if you need other handling of callbacks, take a copy of this Callback implementation and add your own code.

Definition at line 34 of file DefaultCallback.h.

Constructor & Destructor Documentation

org::xmlBlaster::client::protocol::corba::DefaultCallback::DefaultCallback ( org::xmlBlaster::util::Global global,
std::string &  name = "",
org::xmlBlaster::client::I_Callback boss = 0,
void *  = 0 

Construct a persistently named object.

org::xmlBlaster::client::protocol::corba::DefaultCallback::DefaultCallback ( DefaultCallback el  ) 

Definition at line 66 of file DefaultCallback.h.

org::xmlBlaster::client::protocol::corba::DefaultCallback::~DefaultCallback (  ) 

Definition at line 77 of file DefaultCallback.h.

Member Function Documentation

DefaultCallback& org::xmlBlaster::client::protocol::corba::DefaultCallback::operator= ( DefaultCallback el  ) 

Definition at line 72 of file DefaultCallback.h.

serverIdl::XmlTypeArr * DefaultCallback::update ( char *  sessionId,
serverIdl::MessageUnitArr msgUnitArr 

This is the callback method invoked from the server informing the client in an asynchronous mode about new messages.

You don't need to use this little method, but it nicely converts the raw CORBA BlasterCallback.update() with raw Strings and arrays in corresponding objects and calls for every received message the org::xmlBlaster::client::I_Callback.update().

So you should implement in your client the org::xmlBlaster::client::I_Callback interface - suppling the update() method.

loginName The name to whom the callback belongs
msgUnit Contains a org::xmlBlaster::util::MessageUnit structs (your message)
qos Quality of Service of the org::xmlBlaster::util::MessageUnit

Definition at line 48 of file DefaultCallback.cpp.

References corbaWStringToString(), org::xmlBlaster::client::key::MsgKeyBase::getOid(), org::xmlBlaster::util::lexical_cast(), serverIdl::XmlBlasterException::message, toCorbaWString(), and org::xmlBlaster::client::key::MsgKeyBase::toXml().

void DefaultCallback::updateOneway ( char *  sessionId,
serverIdl::MessageUnitArr msgUnitArr 

This is the oneway variant, not returning a value (no application level ACK).

See also:

Definition at line 129 of file DefaultCallback.cpp.

References serverIdl::MessageUnit::content, corbaWStringToString(), org::xmlBlaster::client::qos::GetReturnQos::getSender(), serverIdl::XmlBlasterException::message, serverIdl::MessageUnit::qos, and serverIdl::MessageUnit::xmlKey.

char * DefaultCallback::ping ( char *  qos  ) 

Check the callback server.

See also:

Definition at line 179 of file DefaultCallback.cpp.

Member Data Documentation

org::xmlBlaster::util::Global& org::xmlBlaster::client::protocol::corba::DefaultCallback::global_ [protected]

Definition at line 37 of file DefaultCallback.h.

org::xmlBlaster::util::I_Log& org::xmlBlaster::client::protocol::corba::DefaultCallback::log_ [protected]

Definition at line 38 of file DefaultCallback.h.

org::xmlBlaster::util::key::MsgKeyFactory org::xmlBlaster::client::protocol::corba::DefaultCallback::msgKeyFactory_ [protected]

Definition at line 39 of file DefaultCallback.h.

org::xmlBlaster::util::qos::MsgQosFactory org::xmlBlaster::client::protocol::corba::DefaultCallback::msgQosFactory_ [protected]

Definition at line 40 of file DefaultCallback.h.

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