0.9.8.10
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Member Functions | Private Attributes | List of all members
ResponseHandlerTCP Class Reference

This is the dispatch handler that gets installed as the default handler for the TCP connection. More...

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

Public Member Functions

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

Private Attributes

bool m_connected
 

Additional Inherited Members

- Protected Attributes inherited from ResponseHandler
std::queue< EventPtrm_queue
 
std::mutex m_mutex
 
std::condition_variable m_cond
 

Detailed Description

This is the dispatch handler that gets installed as the default handler for the TCP connection.

It queues up responses that can be fetched by the application via a call to GetResponse() GetResponse() returns false when the connection is disconnected.

Definition at line 122 of file sampleClient.cc.

Constructor & Destructor Documentation

ResponseHandlerTCP::ResponseHandlerTCP ( )
inline

Definition at line 126 of file sampleClient.cc.

Member Function Documentation

virtual bool ResponseHandlerTCP::get_response ( EventPtr event_ptr)
inlinevirtual

Implements ResponseHandler.

Definition at line 164 of file sampleClient.cc.

virtual void ResponseHandlerTCP::handle ( EventPtr event_ptr)
inlinevirtual

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 ResponseHandler.

Definition at line 128 of file sampleClient.cc.

bool ResponseHandlerTCP::wait_for_connection ( )
inline

Definition at line 156 of file sampleClient.cc.

Member Data Documentation

bool ResponseHandlerTCP::m_connected
private

Definition at line 177 of file sampleClient.cc.


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