#include <BESCmdParser.h>
Public Member Functions | |
BESCmdParser () | |
~BESCmdParser () | |
Static Public Member Functions | |
static void | parse (const string &, BESDataHandlerInterface &) |
parse the request string and build the execution plan for the request. |
Parses the incoming request, retrieving first the type of response object that is being requested and passing off the parsing of the request to that response handler. For example, if a "get" request is being sent, the parser parses the string "get", locates the response handler that handes a "get" request, and hands off the parsing of the ramaining request string to that response handler.
First, the parser builds the list of tokens using the BESTokernizer object. This list of tokens is then passed to the response handler to parse the remainder of the request.
All requests must end with a semicolon.
Definition at line 61 of file BESCmdParser.h.
BESCmdParser::BESCmdParser | ( | ) |
Definition at line 39 of file BESCmdParser.cc.
BESCmdParser::~BESCmdParser | ( | ) |
Definition at line 43 of file BESCmdParser.cc.
void BESCmdParser::parse | ( | const string & | request, | |
BESDataHandlerInterface & | dhi | |||
) | [static] |
parse the request string and build the execution plan for the request.
Parse the request string into a list of tokens using the BESTokenizer object and builds the execution plan for the request. This plan includes the type of response object that is being requested.
request | string representing the request from the client | |
dhi | information needed to build the request and to store request information for the server |
BESParserException | thrown if there is an error in syntax |
Definition at line 63 of file BESCmdParser.cc.
References BESCommand::find_command(), BESTokenizer::get_first_token(), BESCommand::parse_request(), _BESDataHandlerInterface::response_handler, and BESTokenizer::tokenize().
Referenced by BESCmdInterface::build_data_request_plan().