semaine::cms::receiver::StateReceiver Class Reference

#include <StateReceiver.h>

Inheritance diagram for semaine::cms::receiver::StateReceiver:
semaine::cms::receiver::XMLReceiver semaine::cms::receiver::Receiver semaine::cms::IOBase

List of all members.

Public Member Functions

 StateReceiver (const std::string &topicName, semaine::datatypes::stateinfo::StateInfo::Type datatype) throw (CMSException)
 StateReceiver (const std::string &topicName, const std::string &messageSelector, semaine::datatypes::stateinfo::StateInfo::Type datatype) throw (CMSException)
 StateReceiver (const std::string &cmsUrl, const std::string &cmsUser, const std::string &cmsPassword, const std::string &topicName, semaine::datatypes::stateinfo::StateInfo::Type datatype) throw (CMSException)
 StateReceiver (const std::string &cmsUrl, const std::string &cmsUser, const std::string &cmsPassword, const std::string &topicName, const std::string &messageSelector, semaine::datatypes::stateinfo::StateInfo::Type datatype) throw (CMSException)
virtual ~StateReceiver ()
std::string getCurrentBestGuess (const std::string &infoItem)
virtual void onMessage (const Message *m)

Protected Member Functions

virtual
semaine::cms::message::SEMAINEMessage
createSEMAINEMessage (const Message *message) throw (semaine::cms::exceptions::MessageFormatException)

Constructor & Destructor Documentation

semaine::cms::receiver::StateReceiver::StateReceiver ( const std::string &  topicName,
semaine::datatypes::stateinfo::StateInfo::Type  datatype 
) throw (CMSException) [inline]

Create a receiver that will listen for all messages in the given Topic on the default JMS server. The default JMS server is determined as follows:

  • jms URL: default value tcp://localhost:61616;
  • jms User: default value empty;
  • jms Password: default value empty.
Parameters:
topic the name of the CMS Topic to listen to.
stateInfoType the type of state info represented by SEMAINEStateMessage objects created by createSEMAINEMessage(Message). This determines the type of StateInfo object returned by SEMAINEStateMessage#getState().
semaine::cms::receiver::StateReceiver::StateReceiver ( const std::string &  topicName,
const std::string &  messageSelector,
semaine::datatypes::stateinfo::StateInfo::Type  datatype 
) throw (CMSException) [inline]

Create a receiver that will listen only to the messages in the given Topic that will pass the given messageSelector, on the default JMS server. The default JMS server is determined as follows:

  • jms URL: default value tcp://localhost:61616;
  • jms User: default value empty;
  • jms Password: default value empty.
Parameters:
topicName the name of the JMS Topic to listen to.
messageSelector a message selector expression, see e.g. http://java.sun.com/javaee/5/docs/api/javax/jms/Message.html for the detailed description.
stateInfoType the type of state info represented by SEMAINEStateMessage objects created by createSEMAINEMessage(Message). This determines the type of StateInfo object returned by SEMAINEStateMessage#getState().
semaine::cms::receiver::StateReceiver::StateReceiver ( const std::string &  cmsUrl,
const std::string &  cmsUser,
const std::string &  cmsPassword,
const std::string &  topicName,
semaine::datatypes::stateinfo::StateInfo::Type  datatype 
) throw (CMSException) [inline]

Create a receiver that will listen for all messages in the given Topic on the given JMS server.

Parameters:
cmsUrl the url where to contact the JMS server
cmsUser the username to use (can be an empty string)
cmsPassword the password to use (can be an empty string)
topic the name of the CMS Topic to listen to.
stateInfoType the type of state info represented by SEMAINEStateMessage objects created by createSEMAINEMessage(Message). This determines the type of StateInfo object returned by SEMAINEStateMessage#getState().
semaine::cms::receiver::StateReceiver::StateReceiver ( const std::string &  cmsUrl,
const std::string &  cmsUser,
const std::string &  cmsPassword,
const std::string &  topicName,
const std::string &  messageSelector,
semaine::datatypes::stateinfo::StateInfo::Type  datatype 
) throw (CMSException) [inline]

Create a receiver that will listen only to the messages in the given Topic that will pass the given messageSelector, on the given JMS server.

Parameters:
cmsUrl the url where to contact the JMS server
cmsUser the username to use (can be an empty string)
cmsPassword the password to use (can be an empty string)
topicName the name of the JMS Topic to listen to.
messageSelector a message selector expression, see e.g. http://java.sun.com/javaee/5/docs/api/javax/jms/Message.html for the detailed description.
stateInfoType the type of state info represented by SEMAINEStateMessage objects created by createSEMAINEMessage(Message). This determines the type of StateInfo object returned by SEMAINEStateMessage#getState().
virtual semaine::cms::receiver::StateReceiver::~StateReceiver (  )  [inline, virtual]

Member Function Documentation

virtual semaine::cms::message::SEMAINEMessage* semaine::cms::receiver::StateReceiver::createSEMAINEMessage ( const Message *  message  )  throw (semaine::cms::exceptions::MessageFormatException) [inline, protected, virtual]

Create a SEMAINE message from the given CMS message. Subclasses may want to override this in order to provide subclasses of SEMAINEMessage for their data.

Parameters:
message the CMS method to convert into a SEMAINE message.
Exceptions:
MessageFormatException if the message format is problematic
NullPointerException if message is null.

Reimplemented from semaine::cms::receiver::XMLReceiver.

std::string semaine::cms::receiver::StateReceiver::getCurrentBestGuess ( const std::string &  infoItem  ) 

Provide the current best guess for the given info item.

Parameters:
infoItem 
Returns:
void semaine::cms::receiver::StateReceiver::onMessage ( const Message *  m  )  [virtual]

Reimplemented from semaine::cms::receiver::Receiver.


The documentation for this class was generated from the following files:
Generated on Tue Dec 14 17:13:18 2010 for SEMAINE by  doxygen 1.6.3