SearchSECODatabaseAPI
RequestHandler Class Reference

Public Member Functions

virtual void initialize (DatabaseHandler *databaseHandler, DatabaseConnection *databaseConnection, RAFTConsensus *raft, Statistics *stats, std::string ip=IP, int port=DBPORT)
 Readies the request handler for later usage.
 
virtual std::string handleRequest (std::string requestType, std::string client, std::string request, boost::shared_ptr< TcpConnection > connection)
 Handles all requests send to the database. More...
 
JobRequestHandlergetJobRequestHandler ()
 

Member Function Documentation

◆ handleRequest()

std::string RequestHandler::handleRequest ( std::string  requestType,
std::string  client,
std::string  request,
boost::shared_ptr< TcpConnection connection 
)
virtual

Handles all requests send to the database.

Parameters
requestTypeType of the request, a string of exactly 4 characters.
requestThe request made by the user, a string containing all relevant data in a specific order to be able to do the request.
Returns
Response towards user after processing the request successfully.

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