Convenience class to simplify the protocol messages handling. This class is useful to parse the "raw" message received by the server into much more handy ResponseMessage objects. It also features convenience function to create INSERT and SEARCH requests. More...
#include <client_protocol.h>
Public Member Functions | |
std::string | createInsertRequest (const std::string &dssName, std::map< std::string, std::string > &sdFields, const std::map< std::string, std::string > &dataItems) |
std::string | createRemoveRequest (const std::string &sequenceNumber, const std::string &dssName) |
std::string | createGetRequest (const std::string &sequenceNumber, const std::string &dssName) |
std::string | createSearchRequest (const std::string &dssName, std::map< std::string, std::string > &sdQueryFields) |
std::string | createInsertRequest (const std::string &input, std::map< std::string, std::string > &dataItems) |
std::string | createRemoveRequest (const std::string &input) |
std::string | createGetRequest (const std::string &input) |
std::string | createSearchRequest (const std::string &input) |
ResponseMessage | parseResponseMessage (const std::string &response) |
InsertResponse | parseInsertResponse (const std::string &response) |
GetResponse | parseGetResponse (const std::string &response) |
SearchResponse | parseSearchResponse (const std::string &response) |
SpeclistResponse | parseSpeclistResponse (const std::string &response) |
std::string | getExtendedErrorMessage (ResponseCode code) |
RequestMessage * | parseRequest (const std::string &request) |
std::string | createGetResponse (int sequenceNumber, const std::map< std::string, std::string > &sdFields, const std::map< std::string, std::string > &dataItems) |
std::string | createSearchResponse (const std::vector< entity::SetDescriptor > &descriptorList) |
Convenience class to simplify the protocol messages handling. This class is useful to parse the "raw" message received by the server into much more handy ResponseMessage objects. It also features convenience function to create INSERT and SEARCH requests.
Convenience class to simplify the protocol messages handling. This class is useful to parse the "raw" message received by the client into much more handy RequestMessage objects. It also features convenience function to create response messages to GET and SEARCH requests.
string ProtocolHandler::getExtendedErrorMessage | ( | ResponseCode | code | ) |
Translate a response code from enum to an extended error message.
code | a ResponseCode of a certain server response. |
RequestMessage * ProtocolHandler::parseRequest | ( | const std::string & | request | ) |
Parse a "raw" client request into a RequestMessage object.
request | String with the "raw" request message. |