cmsg::cMsg Class Reference

#include <cMsg.hxx>

List of all members.


Detailed Description

Wraps most cMsg C calls, provides main functionality.

Definition at line 297 of file cMsg.hxx.

Public Member Functions

 cMsg (const string &UDL, const string &name, const string &descr)
 Constructor for cMsg system object.
virtual ~cMsg (void)
 Destructor disconects from cMsg system.
virtual void connect () throw (cMsgException)
 Connects to cMsg system.
virtual void disconnect (void) throw (cMsgException)
 Disconnects from cMsg system.
virtual void send (cMsgMessage &msg) throw (cMsgException)
 Sends message.
virtual void send (cMsgMessage *msg) throw (cMsgException)
 Sends message.
virtual int syncSend (cMsgMessage &msg, const struct timespec *timeout=NULL) throw (cMsgException)
 Synchronously sends message.
virtual int syncSend (cMsgMessage *msg, const struct timespec *timeout=NULL) throw (cMsgException)
 Synchronously sends message.
virtual void * subscribe (const string &subject, const string &type, cMsgCallback *cb, void *userArg, const cMsgSubscriptionConfig *cfg=NULL) throw (cMsgException)
 Subscribes to subject,type and specifies callback,userArg.
virtual void * subscribe (const string &subject, const string &type, cMsgCallback &cb, void *userArg, const cMsgSubscriptionConfig *cfg=NULL) throw (cMsgException)
 Subscribes to subject,type and specifies callback,userArg.
virtual void unsubscribe (void *handle) throw (cMsgException)
 Unsubscribes.
virtual cMsgMessagesendAndGet (cMsgMessage &sendMsg, const struct timespec *timeout=NULL) throw (cMsgException)
 Sends message and gets reply.
virtual cMsgMessagesendAndGet (cMsgMessage *sendMsg, const struct timespec *timeout=NULL) throw (cMsgException)
 Sends message and gets reply.
virtual cMsgMessagesubscribeAndGet (const string &subject, const string &type, const struct timespec *timeout=NULL) throw (cMsgException)
 Subscribes to subject/type, returns one matching message, then unsubscribes.
virtual void flush (const struct timespec *timeout=NULL) throw (cMsgException)
 Flushes outgoing message queues.
virtual void start (void) throw (cMsgException)
 Enables delivery of messages to callbacks.
virtual void stop (void) throw (cMsgException)
 Disables delivery of messages to callbacks.
virtual string getUDL (void) const
 Gets connection UDL.
virtual string getName (void) const
 Gets connection name.
virtual string getDescription (void) const
 Gets connection description.
virtual bool isConnected (void) const
 True if connected.
virtual bool isReceiving (void) const
 True if receiving messages.
virtual void setShutdownHandler (cMsgShutdownHandler *handler, void *userArg) throw (cMsgException)
 Sets shutdown handler.
virtual void shutdownClients (const string &client, int flag) throw (cMsgException)
 Shuts down a client.
virtual void shutdownServers (const string &server, int flag) throw (cMsgException)
 Shuts down a server.
virtual cMsgMessagemonitor (const string &monString) throw (cMsgException)
 Returns domain-dependent monitoring information.


Constructor & Destructor Documentation

cMsg::cMsg const string &  UDL,
const string &  name,
const string &  descr
 

Constructor for cMsg system object.

Parameters:
UDL Connection UDL
name Name
descr Description

Definition at line 1566 of file cMsgWrapper.cc.

cMsg::~cMsg void   )  [virtual]
 

Destructor disconects from cMsg system.

Definition at line 1577 of file cMsgWrapper.cc.


Member Function Documentation

void cMsg::connect void   )  throw (cMsgException) [virtual]
 

Connects to cMsg system.

Definition at line 1588 of file cMsgWrapper.cc.

void cMsg::disconnect void   )  throw (cMsgException) [virtual]
 

Disconnects from cMsg system.

Definition at line 1607 of file cMsgWrapper.cc.

void cMsg::flush const struct timespec *  timeout = NULL  )  throw (cMsgException) [virtual]
 

Flushes outgoing message queues.

Parameters:
timeout Timeout

Definition at line 1883 of file cMsgWrapper.cc.

string cMsg::getDescription void   )  const [virtual]
 

Gets connection description.

Returns:
Description

Definition at line 1939 of file cMsgWrapper.cc.

string cMsg::getName void   )  const [virtual]
 

Gets connection name.

Returns:
Name

Definition at line 1952 of file cMsgWrapper.cc.

string cMsg::getUDL void   )  const [virtual]
 

Gets connection UDL.

Returns:
UDL

Definition at line 1965 of file cMsgWrapper.cc.

bool cMsg::isConnected void   )  const [virtual]
 

True if connected.

Returns:
True if connected

Definition at line 1978 of file cMsgWrapper.cc.

bool cMsg::isReceiving void   )  const [virtual]
 

True if receiving messages.

Returns:
True if receiving messages

Definition at line 1999 of file cMsgWrapper.cc.

cMsgMessage * cMsg::monitor const string &  monString  )  throw (cMsgException) [virtual]
 

Returns domain-dependent monitoring information.

Parameters:
monString Monitoring request string
Returns:
Message containing monitoring information in text field

Definition at line 2085 of file cMsgWrapper.cc.

void cMsg::send cMsgMessage msg  )  throw (cMsgException) [virtual]
 

Sends message.

Parameters:
msg Message to send

Definition at line 1644 of file cMsgWrapper.cc.

void cMsg::send cMsgMessage msg  )  throw (cMsgException) [virtual]
 

Sends message.

Parameters:
msg Message to send

Definition at line 1624 of file cMsgWrapper.cc.

cMsgMessage * cMsg::sendAndGet cMsgMessage sendMsg,
const struct timespec *  timeout = NULL
throw (cMsgException) [virtual]
 

Sends message and gets reply.

Parameters:
sendMsg Message to send
timeout Timeout
Returns:
Reply message

Definition at line 1832 of file cMsgWrapper.cc.

cMsgMessage * cMsg::sendAndGet cMsgMessage sendMsg,
const struct timespec *  timeout = NULL
throw (cMsgException) [virtual]
 

Sends message and gets reply.

Parameters:
sendMsg Message to send
timeout Timeout
Returns:
Reply message

Definition at line 1805 of file cMsgWrapper.cc.

void cMsg::setShutdownHandler cMsgShutdownHandler *  handler,
void *  userArg
throw (cMsgException) [virtual]
 

Sets shutdown handler.

Parameters:
handler Shutdown handler
userArg Arg passed to handler upon shutdown

Definition at line 2021 of file cMsgWrapper.cc.

void cMsg::shutdownClients const string &  client,
int  flag
throw (cMsgException) [virtual]
 

Shuts down a client.

Parameters:
client The client
flag Shutdown flag

Definition at line 2042 of file cMsgWrapper.cc.

void cMsg::shutdownServers const string &  server,
int  flag
throw (cMsgException) [virtual]
 

Shuts down a server.

Parameters:
server The server
flag Shutdown flag

Definition at line 2063 of file cMsgWrapper.cc.

void cMsg::start void   )  throw (cMsgException) [virtual]
 

Enables delivery of messages to callbacks.

Definition at line 1901 of file cMsgWrapper.cc.

void cMsg::stop void   )  throw (cMsgException) [virtual]
 

Disables delivery of messages to callbacks.

Definition at line 1919 of file cMsgWrapper.cc.

void * cMsg::subscribe const string &  subject,
const string &  type,
cMsgCallback cb,
void *  userArg,
const cMsgSubscriptionConfig cfg = NULL
throw (cMsgException) [virtual]
 

Subscribes to subject,type and specifies callback,userArg.

Parameters:
subject Subject, can be regex
type Type, can be regex
cb Callback object to deliver messages to
userArg Passed to callback with message
cfg Subscription config object
Returns:
Subscription handle, needed to unsubscribe

Definition at line 1758 of file cMsgWrapper.cc.

void * cMsg::subscribe const string &  subject,
const string &  type,
cMsgCallback cb,
void *  userArg,
const cMsgSubscriptionConfig cfg = NULL
throw (cMsgException) [virtual]
 

Subscribes to subject,type and specifies callback,userArg.

Parameters:
subject Subject, can be regex
type Type, can be regex
cb Callback object to deliver messages to
userArg Passed to callback with message
cfg Subscription config object
Returns:
Subscription handle, needed to unsubscribe

Definition at line 1701 of file cMsgWrapper.cc.

cMsgMessage * cMsg::subscribeAndGet const string &  subject,
const string &  type,
const struct timespec *  timeout = NULL
throw (cMsgException) [virtual]
 

Subscribes to subject/type, returns one matching message, then unsubscribes.

Parameters:
subject Subject, can be regex
type Type, can be regex
timeout Timeout
Returns:
Matching message

Definition at line 1859 of file cMsgWrapper.cc.

int cMsg::syncSend cMsgMessage msg,
const struct timespec *  timeout = NULL
throw (cMsgException) [virtual]
 

Synchronously sends message.

Parameters:
msg Message to send
timeout Timeout

Definition at line 1682 of file cMsgWrapper.cc.

int cMsg::syncSend cMsgMessage msg,
const struct timespec *  timeout = NULL
throw (cMsgException) [virtual]
 

Synchronously sends message.

Parameters:
msg Message to send
timeout Timeout

Definition at line 1658 of file cMsgWrapper.cc.

void cMsg::unsubscribe void *  handle  )  throw (cMsgException) [virtual]
 

Unsubscribes.

Parameters:
handle Subscription handle

Definition at line 1772 of file cMsgWrapper.cc.


The documentation for this class was generated from the following files:
Generated on Wed Feb 6 13:37:50 2008 for cMsg Messaging System by  doxygen 1.3.9.1