0.9.8.10
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Member Functions | List of all members
Hyperspace::ResponseCallbackAttrGet Class Reference

Sends back result of an attr_get request. More...

#include <ResponseCallbackAttrGet.h>

Inheritance diagram for Hyperspace::ResponseCallbackAttrGet:
Inheritance graph
[legend]
Collaboration diagram for Hyperspace::ResponseCallbackAttrGet:
Collaboration graph
[legend]

Public Member Functions

 ResponseCallbackAttrGet (Hypertable::Comm *comm, Hypertable::EventPtr &event)
 Constructor. More...
 
int response (const std::vector< Hypertable::DynamicBufferPtr > &buffers)
 Sends back result of an attr_get request. More...
 
- Public Member Functions inherited from Hypertable::ResponseCallback
 ResponseCallback (Comm *comm, EventPtr &event)
 Constructor. More...
 
 ResponseCallback ()
 Default constructor. More...
 
virtual ~ResponseCallback ()
 Destructor. More...
 
virtual int error (int error, const String &msg)
 Sends a standard error response back to the client. More...
 
virtual int response_ok ()
 Sends a a simple success response back to the client which is just the 4-byte error code Error::OK. More...
 
void get_address (struct sockaddr_in &addr)
 Gets the remote address of the requesting client. More...
 
const InetAddr get_address () const
 Gets the remote address of the requesting client. More...
 
EventPtrevent ()
 Get smart pointer to event object that triggered the request. More...
 

Additional Inherited Members

- Protected Attributes inherited from Hypertable::ResponseCallback
Commm_comm
 Comm pointer. More...
 
EventPtr m_event
 Smart pointer to event object. More...
 

Detailed Description

Sends back result of an attr_get request.

Definition at line 46 of file ResponseCallbackAttrGet.h.

Constructor & Destructor Documentation

Hyperspace::ResponseCallbackAttrGet::ResponseCallbackAttrGet ( Hypertable::Comm comm,
Hypertable::EventPtr event 
)
inline

Constructor.

Parameters
commComm instance
eventComm event that originated the request

Definition at line 53 of file ResponseCallbackAttrGet.h.

Member Function Documentation

int ResponseCallbackAttrGet::response ( const std::vector< Hypertable::DynamicBufferPtr > &  buffers)

Sends back result of an attr_get request.

This method is called to send back the result of an attr_get request. A response message containing the result is encoded and sent back to the requesting client with a call to Comm::send_response(). The response message is encoded as follows:

EncodingDescription
i32Error::OK
i32Attribute count
bytes32foreach attribute, fetched value
Parameters
buffersVector of attribute values
Returns
Error code returned from Comm::send_response()

Definition at line 40 of file ResponseCallbackAttrGet.cc.


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