this class receives notification messages from the NotificationProducer and uses the SubscritionTreeManager class to nofity the clients More...
#include <NotificationConsumer.h>
Static Public Member Functions | |
static NotificationConsumer * | getInstance (SubscriptionTreeManager &subscriptionTreeManager) |
Use this method to either get the existing singleton object, or to create a new one, if not existing. | |
Private Member Functions | |
void | run () |
This method listens in a nonblocking mode to the msg queue. It runs in a seperate thread. | |
NotificationConsumer () | |
private constructor | |
NotificationConsumer (const std::string &queueName, SubscriptionTreeManager &subscriptionTreeManager) | |
NotificationConsumer (const NotificationConsumer &other) | |
copy constructor | |
NotificationConsumer & | operator= (const NotificationConsumer &other) |
~NotificationConsumer () | |
Static Private Member Functions | |
static void | releaseInstance () |
releases the singleton instance .. only done by the Abstract Equipment, therefor ptivat + friend | |
Private Attributes | |
SubscriptionTreeManager & | subscriptionTreeManager_ |
AbstractMsgQueue * | msgQueuePtr_ |
pointer to the queue to listen at | |
Static Private Attributes | |
static NotificationConsumer * | theInstance_ = NULL |
instance of the singleton object | |
Friends | |
class | AbstractEquipment |
this class receives notification messages from the NotificationProducer and uses the SubscritionTreeManager class to nofity the clients
Definition at line 22 of file NotificationConsumer.h.
fesa::NotificationConsumer::NotificationConsumer | ( | ) | [private] |
private constructor
Referenced by getInstance().
fesa::NotificationConsumer::NotificationConsumer | ( | const std::string & | queueName, | |
SubscriptionTreeManager & | subscriptionTreeManager | |||
) | [private] |
Definition at line 37 of file NotificationConsumer.cpp.
References fesa::DiagnosticUtils::framework, fesa::AbstractEquipment::getDeviceDataFileName(), getInstance(), fesa::MsgQueueFactory::getOrCreateMsgQueue(), fesa::AbstractEquipment::getProcessConfiguration(), fesa::DiagnosticUtils::DiagnosticMessage::msg, fesa::PropertyTag::MSG_NUM_MAX, msgQueuePtr_, fesa::DiagnosticUtils::server, fesa::Thread::setDetachState(), fesa::Thread::setPriority(), fesa::DiagnosticUtils::DiagnosticMessage::side, and fesa::DiagnosticUtils::DiagnosticMessage::source.
fesa::NotificationConsumer::NotificationConsumer | ( | const NotificationConsumer & | other | ) | [private] |
copy constructor
fesa::NotificationConsumer::~NotificationConsumer | ( | ) | [private] |
Definition at line 60 of file NotificationConsumer.cpp.
NotificationConsumer * fesa::NotificationConsumer::getInstance | ( | SubscriptionTreeManager & | subscriptionTreeManager | ) | [static] |
Use this method to either get the existing singleton object, or to create a new one, if not existing.
Definition at line 64 of file NotificationConsumer.cpp.
References fesa::AbstractEquipment::getEquipmentName(), NotificationConsumer(), and theInstance_.
Referenced by NotificationConsumer(), run(), and fesa::AbstractServerController::start().
NotificationConsumer& fesa::NotificationConsumer::operator= | ( | const NotificationConsumer & | other | ) | [private] |
void fesa::NotificationConsumer::releaseInstance | ( | ) | [static, private] |
releases the singleton instance .. only done by the Abstract Equipment, therefor ptivat + friend
Definition at line 74 of file NotificationConsumer.cpp.
References theInstance_.
void fesa::NotificationConsumer::run | ( | ) | [private, virtual] |
This method listens in a nonblocking mode to the msg queue. It runs in a seperate thread.
Implements fesa::Thread.
Definition at line 83 of file NotificationConsumer.cpp.
References fesa::AutomaticNotificationMsg, fesa::CommandMessage::command_, fesa::CommandMsg, fesa::AbstractMsgQueue::consumeMsg(), FesaErrorUnknownMessageType, fesa::DiagnosticUtils::framework, fesa::GET, fesa::AbstractComponentEquipment::getDeviceClassCol(), getInstance(), fesa::FesaException::getMessage(), fesa::AbstractMsgQueue::getQueueName(), fesa::Thread::isRunning_, fesa::ManualNotificationMsg, fesa::DiagnosticUtils::DiagnosticMessage::msg, msgQueuePtr_, fesa::AbstractMessage::msgType_, fesa::ManualNotificationMessage::muxContext_, fesa::AutomaticNotificationMessage::muxContext_, fesa::EquipmentData::notificationFailure_, fesa::AutomaticNotificationMessage::notificationID_, fesa::SubscriptionTreeManager::notify(), fesa::CommandMessage::parameter1_, fesa::AbstractMsgQueue::purge(), fesa::DiagnosticUtils::server, fesa::DiagnosticUtils::DiagnosticMessage::side, fesa::DiagnosticUtils::DiagnosticMessage::source, and subscriptionTreeManager_.
friend class AbstractEquipment [friend] |
Definition at line 67 of file NotificationConsumer.h.
pointer to the queue to listen at
Definition at line 37 of file NotificationConsumer.h.
Referenced by NotificationConsumer(), and run().
Definition at line 34 of file NotificationConsumer.h.
Referenced by run().
NotificationConsumer * fesa::NotificationConsumer::theInstance_ = NULL [static, private] |
instance of the singleton object
Definition at line 40 of file NotificationConsumer.h.
Referenced by getInstance(), and releaseInstance().