bes Updated for version 3.21.1
The Backend Server (BES) is the lower two tiers of the Hyrax data server
|
Public Types | |
enum | ResponseType { eRT_RequestDDX = 0 , eRT_RequestDataDDS } |
Public Member Functions | |
void | cleanup () |
restore dhi to clean state | |
DDSLoader (BESDataHandlerInterface &dhi) | |
Create a loader that will hijack dhi on a load call, then restore it's state. | |
DDSLoader (const DDSLoader &proto) | |
BESDataHandlerInterface & | getDHI () const |
void | loadInto (const std::string &location, ResponseType type, BESDapResponse *pResponse) |
Load a DDX or DataDDS response into the given pResponse object, which must be non-null. | |
DDSLoader & | operator= (const DDSLoader &) |
virtual | ~DDSLoader () |
Dtor restores the state of dhi Restores the state of the dhi to what it was when object if it is still hijacked (i.e. exception on load()) Destroys the BESDDSResponse if non-null, which is also the case on failed load() call. | |
Static Public Member Functions | |
static bool | checkResponseIsValidType (ResponseType type, BESDapResponse *pResponse) |
static std::string | getActionForType (ResponseType type) |
static std::string | getActionNameForType (ResponseType type) |
static std::unique_ptr< BESDapResponse > | makeResponseForType (ResponseType type) |
Definition at line 62 of file DDSLoader.h.
For telling the loader what type of BESDapResponse to load and return. It can handle a DDX load or a DataDDS load. The returned BesDapResponse will be of the proper subclass.
Definition at line 93 of file DDSLoader.h.
|
explicit |
Create a loader that will hijack dhi on a load call, then restore it's state.
dhi | DHI to hijack during load, needs to be a valid object for the scope of this object's life. |
Definition at line 75 of file DDSLoader.cc.
DDSLoader::DDSLoader | ( | const DDSLoader & | proto | ) |
Definition at line 82 of file DDSLoader.cc.
|
virtual |
Dtor restores the state of dhi Restores the state of the dhi to what it was when object if it is still hijacked (i.e. exception on load()) Destroys the BESDDSResponse if non-null, which is also the case on failed load() call.
Definition at line 133 of file DDSLoader.cc.
|
static |
Return whether the given response's type matches the given ResposneType. If type==eRT_RequestDDX, pResponse must be BESDDSResponse If type==eRT_RequeastDataDDS, pResponse must be BESDataDDSResponse
Definition at line 466 of file DDSLoader.cc.
void DDSLoader::cleanup | ( | ) |
restore dhi to clean state
Ensures that the resources and dhi are all in the state they were at construction time. Probably not needed by users, but in case they want to catch an exception and then retry or something
Definition at line 252 of file DDSLoader.cc.
|
static |
Convert the type into the action in BESResponseNames.h for the type.
type | the response type |
Definition at line 442 of file DDSLoader.cc.
|
static |
Convert the type in the action name in BESResponseNames.h
type | the response type |
Definition at line 454 of file DDSLoader.cc.
|
inline |
Return a reference to the dhi we are using. A little dangerous to bare this rep, so be careful in its usage!
Definition at line 119 of file DDSLoader.h.
void DDSLoader::loadInto | ( | const std::string & | location, |
ResponseType | type, | ||
BESDapResponse * | pResponse ) |
Load a DDX or DataDDS response into the given pResponse object, which must be non-null.
Similar to load(), but the caller passes in the response object to fill rather than wanting a new one.
If type == eRT_RequestDDX, pResponse MUST have type BESDDSReponse. If type == eRT_RequestDataDDS, pResponse MUST have type BESDataDDSResponse.
The location is loaded in pResponse based on the type of response requested.
location | the file to load |
type | the response type requested, must match type of pResponse |
pResponse | the response object to fill in, which must match the request type. |
If | there is a problem loading the location. |
Definition at line 150 of file DDSLoader.cc.
|
static |
Make a new response object for the requested type.
Definition at line 427 of file DDSLoader.cc.
Definition at line 89 of file DDSLoader.cc.