0.9.8.10
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Member Functions | Protected Attributes | List of all members
ResponseHandler Class Referenceabstract

(somewhat) Abstract base class for response handlers; Defines the message queue and the mutex and condition variable to protect it. More...

Inheritance diagram for ResponseHandler:
Inheritance graph
[legend]
Collaboration diagram for ResponseHandler:
Collaboration graph
[legend]

Public Member Functions

 ResponseHandler ()
 
virtual ~ResponseHandler ()
 
virtual void handle (EventPtr &event_ptr)=0
 Callback method. More...
 
virtual bool get_response (EventPtr &event_ptr)=0
 
- Public Member Functions inherited from Hypertable::DispatchHandler
virtual ~DispatchHandler ()
 Destructor. More...
 

Protected Attributes

std::queue< EventPtrm_queue
 
std::mutex m_mutex
 
std::condition_variable m_cond
 

Detailed Description

(somewhat) Abstract base class for response handlers; Defines the message queue and the mutex and condition variable to protect it.

Definition at line 95 of file sampleClient.cc.

Constructor & Destructor Documentation

ResponseHandler::ResponseHandler ( )
inline

Definition at line 99 of file sampleClient.cc.

virtual ResponseHandler::~ResponseHandler ( )
inlinevirtual

Definition at line 100 of file sampleClient.cc.

Member Function Documentation

virtual bool ResponseHandler::get_response ( EventPtr event_ptr)
pure virtual

Implemented in ResponseHandlerUDP, and ResponseHandlerTCP.

virtual void ResponseHandler::handle ( EventPtr event_ptr)
pure virtual

Callback method.

When the Comm layer needs to deliver an event to the application, this method is called to do so. The set of event types include, CONNECTION_ESTABLISHED, DISCONNECT, MESSAGE, ERROR, and TIMER.

Parameters
event_ptrsmart pointer to Event object

Implements Hypertable::DispatchHandler.

Implemented in ResponseHandlerUDP, and ResponseHandlerTCP.

Member Data Documentation

std::condition_variable ResponseHandler::m_cond
protected

Definition at line 109 of file sampleClient.cc.

std::mutex ResponseHandler::m_mutex
protected

Definition at line 108 of file sampleClient.cc.

std::queue<EventPtr> ResponseHandler::m_queue
protected

Definition at line 107 of file sampleClient.cc.


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