/* * File: ControlMessageConfirm.cc * Author: jgaebler * * Created on February 9, 2011, 5:50 PM */ #include "ControlMessageConfirm.h" #include "Dispatcher.h" #include "common/validator/MessageValidator.h" #include "fd/NetworkFailureDetector.h" namespace ubeeme { namespace moversight { /** * @brief Constructor */ ControlMessageConfirm::ControlMessageConfirm() : MoversightMessage( "CMC", CMC){ } /** * @brief Destructor */ ControlMessageConfirm::~ControlMessageConfirm() { } /** * @brief Copy constructor * @param other */ ControlMessageConfirm::ControlMessageConfirm(const ControlMessageConfirm & other) : MoversightMessage(other) { operator =(other); } /** * @brief Creates a copy of the current message. * @return The copy of the current message. */ ControlMessageConfirm* ControlMessageConfirm::dup() const { return new ControlMessageConfirm(*this); } /** * @brief Assignment operator. * @param other The instance to assign. * @return A reference to the local instance. */ ControlMessageConfirm & ControlMessageConfirm::operator=(const ControlMessageConfirm & other) { MoversightMessage::operator =(other); return *this; } /** * @brief Handles this message. To handle a message, it has first successfully validated. * @param dis A reference to the dispatcher, used to forward this message to the handling modules. */ void ControlMessageConfirm::handleReceive( Dispatcher& dis) { if(dis.getMessageValidator()->isValid( *this)) { dis.getNetworkFailureDetector().handleMessage(this); }//end if } } }