bes  Updated for version 3.20.6
DmrppRequestHandler.h
1 // DmrppRequestHandler.h
2 
3 // Copyright (c) 2016 OPeNDAP, Inc. Author: James Gallagher
4 // <jgallagher@opendap.org>, Patrick West <pwest@opendap.org>
5 // Nathan Potter <npotter@opendap.org>
6 //
7 // modify it under the terms of the GNU Lesser General Public License
8 // as published by the Free Software Foundation; either version 2.1 of
9 // the License, or (at your option) any later version.
10 //
11 // This library is distributed in the hope that it will be useful, but
12 // WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
15 //
16 // License along with this library; if not, write to the Free Software
17 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
18 // 02110-1301 U\ SA
19 //
20 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI.
21 // 02874-0112.
22 
23 #ifndef I_DmrppRequestHandler_H
24 #define I_DmrppRequestHandler_H
25 
26 #include <string>
27 #include <ostream>
28 
29 #include "BESRequestHandler.h"
30 
31 class ObjMemCache; // in bes/dap
32 class BESContainer;
33 
34 namespace libdap {
35  class DMR;
36  class DDS;
37 }
38 
39 namespace dmrpp {
40 
41 class CurlHandlePool;
42 
44 
45 private:
46  // These are not used. See the netcdf handler for an example of their use.
47  // jhrg 4/24/18
48  static ObjMemCache *das_cache;
49  static ObjMemCache *dds_cache;
50  static ObjMemCache *dmr_cache;
51 
52  // These are static because they are used by the static public methods.
53  static void build_dmr_from_file(BESContainer *container, libdap::DMR* dmr);
54 
55 public:
56  DmrppRequestHandler(const std::string &name);
57  virtual ~DmrppRequestHandler();
58 
59  static CurlHandlePool *curl_handle_pool;
60 
61  static bool d_use_parallel_transfers;
62  static unsigned int d_max_parallel_transfers;
63 
64  static unsigned int d_min_size;
65 
66  static bool dap_build_dmr(BESDataHandlerInterface &dhi);
67  static bool dap_build_dap4data(BESDataHandlerInterface &dhi);
68  static bool dap_build_das(BESDataHandlerInterface &dhi);
69  static bool dap_build_dds(BESDataHandlerInterface &dhi);
71 
72  static bool dap_build_vers(BESDataHandlerInterface &dhi);
73  static bool dap_build_help(BESDataHandlerInterface &dhi);
74 
75  virtual void dump(std::ostream &strm) const;
76 };
77 
78 } // namespace dmrpp
79 
80 #endif // DmrppRequestHandler.h
BESRequestHandler
Represents a specific data type request handler.
Definition: BESRequestHandler.h:74
dmrpp::DmrppRequestHandler::dump
virtual void dump(std::ostream &strm) const
dumps information about this object
Definition: DmrppRequestHandler.cc:537
ObjMemCache
An in-memory cache for DapObj (DAS, DDS, ...) objects.
Definition: ObjMemCache.h:84
dmrpp::DmrppRequestHandler
Definition: DmrppRequestHandler.h:43
dmrpp::DmrppRequestHandler::dap_build_dds
static bool dap_build_dds(BESDataHandlerInterface &dhi)
Definition: DmrppRequestHandler.cc:354
libdap
Definition: BESDapFunctionResponseCache.h:35
dmrpp::DmrppRequestHandler::dap_build_dmr
static bool dap_build_dmr(BESDataHandlerInterface &dhi)
Definition: DmrppRequestHandler.cc:179
dmrpp::DmrppRequestHandler::DmrppRequestHandler
DmrppRequestHandler(const std::string &name)
Definition: DmrppRequestHandler.cc:120
dmrpp::DmrppRequestHandler::dap_build_dap2data
static bool dap_build_dap2data(BESDataHandlerInterface &dhi)
Definition: DmrppRequestHandler.cc:261
BESContainer
A container is something that holds data. E.G., a netcdf file or a database entry.
Definition: BESContainer.h:65
BESDataHandlerInterface
Structure storing information used by the BES to handle the request.
Definition: BESDataHandlerInterface.h:56
dmrpp::DmrppRequestHandler::dap_build_das
static bool dap_build_das(BESDataHandlerInterface &dhi)
Definition: DmrppRequestHandler.cc:433
dmrpp::CurlHandlePool
Definition: CurlHandlePool.h:114