33#include "BESWWWGetCommand.h"
34#include "BESTokenizer.h"
35#include "BESResponseHandlerList.h"
36#include "BESDefinitionStorageList.h"
37#include "BESDefinitionStorage.h"
39#include "BESSyntaxUserError.h"
40#include "BESDataNames.h"
41#include "BESWWWNames.h"
74 BESResponseHandlerList::TheList()->find_handler(_cmd);
76 string err(
"Command ");
78 err +=
" does not have a registered response handler";
83 string my_token = parse_options(tokenizer, dhi);
84 if (my_token !=
"for") {
85 tokenizer.
parse_error(my_token +
" not expected\n");
90 if (my_token ==
"using") {
94 if (my_token !=
";") {
96 " not expected, expecting ';'");
100 " not expected, expecting \"return\" or ';'");
117 BESDefine *d = BESDefinitionStorageList::TheList()->look_for(def_name);
119 string s = (string)
"Unable to find definition " + def_name;
123 BESDefine::containers_citer i = d->first_container();
124 BESDefine::containers_citer ie = d->end_container();
126 dhi.containers.push_back(*i);
129 dhi.
data[AGG_CMD] = d->get_agg_cmd();
130 dhi.
data[AGG_HANDLER] = d->get_agg_handler();
131 dhi.
data[WWW_URL] = url;
Structure storing information used by the BES to handle the request.
std::map< std::string, std::string > data
the map of string data that will be required for the current request.
std::string action
the response object requested, e.g. das, dds
handler object that knows how to create a specific response object
error thrown if there is a user syntax error in the request or any other user error
tokenizer for the BES request command string
void parse_error(const std::string &s="")
throws an exception giving the tokens up to the point of the problem
std::string & get_next_token()
returns the next token from the token list
virtual BESResponseHandler * parse_request(BESTokenizer &tokens, BESDataHandlerInterface &dhi)
knows how to parse a get request