Public Member Functions | Protected Attributes | List of all members
novaddt::Responder< request_t, response_t > Class Template Referenceabstract

#include "/cvmfs/nova-development.opensciencegrid.org/novasoft/releases/N21-03-03/OnlineCalibration/online/DDTRC.h"

Inheritance diagram for novaddt::Responder< request_t, response_t >:
novaddt::Lockable

Public Member Functions

virtual ~Responder ()
 
boost::shared_ptr< response_t > handleMessage (boost::shared_ptr< request_t > message)
 
virtual void handle (const request_t &request)=0
 

Protected Attributes

boost::mutex _callbackMutex
 

Detailed Description

template<class request_t, class response_t>
class novaddt::Responder< request_t, response_t >

Definition at line 37 of file DDTRC.h.

Constructor & Destructor Documentation

template<class request_t, class response_t>
virtual novaddt::Responder< request_t, response_t >::~Responder ( )
inlinevirtual

Definition at line 39 of file DDTRC.h.

39 {};

Member Function Documentation

template<class request_t, class response_t>
virtual void novaddt::Responder< request_t, response_t >::handle ( const request_t &  request)
pure virtual
template<class request_t, class response_t>
boost::shared_ptr<response_t> novaddt::Responder< request_t, response_t >::handleMessage ( boost::shared_ptr< request_t >  message)
inline

Definition at line 42 of file DDTRC.h.

42  {
43  boost::mutex::scoped_lock sl(_callbackMutex);
44  // create the reply
45  try{
46  handle(*message);
47  }
48  catch(std::exception e){
49  return Response<response_t>(1,std::string("Reques failed: ")+e.what());
50  }
51 
52  return Response<response_t>(0,"Success");
53  }
virtual void handle(const request_t &request)=0
::xsd::cxx::tree::exception< char > exception
Definition: Database.h:225
boost::mutex _callbackMutex
Definition: DDTRC.h:17
Float_t e
Definition: plot.C:35
enum BeamMode string

Member Data Documentation

boost::mutex novaddt::Lockable::_callbackMutex
mutableprotectedinherited

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