bes Updated for version 3.21.1
The Backend Server (BES) is the lower two tiers of the Hyrax data server
CmdClient Class Reference

#include <CmdClient.h>

Inheritance diagram for CmdClient:
Inheritance graph
Collaboration diagram for CmdClient:
Collaboration graph

Public Member Functions

void brokenPipe ()
 
virtual void dump (std::ostream &strm) const
 dump the contents of this object to the specified ostream
 
bool executeClientCommand (const std::string &cmd)
 
bool executeCommands (const std::string &cmd, int repeat)
 
bool executeCommands (std::ifstream &inputFile, int repeat)
 
bool interact ()
 
bool isConnected ()
 
void setOutput (std::ostream *strm, bool created)
 
void shutdownClient ()
 
void startClient (const std::string &host, int portVal, int timeout)
 
void startClient (const std::string &unixSocket, int timeout)
 

Detailed Description

CmdClient is an object that handles the connection to, sending requests to, and receiving response from a specified OpenDAP server running either on this machine or another machine.

Requests to the OpenDAP server can be taken in different ways by the CmdClient object.

  • One request, ending with a semicolon.
  • Multiple requests, each ending with a semicolon.
  • Requests listed in a file, each request can span multiple lines in the file and there can be more than one request per line. Each request ends with a semicolon.
  • Interactive mode where the user inputs requests on the command line, each ending with a semicolon, with multiple requests allowed per line.

Response from the requests can sent to any File or OutputStream as specified by using the setOutput methods. If no output is specified using the setOutput methods thent he output is ignored.

Thread safety of this object has not yet been determined.

Author
Patrick West <A * HREF="mailto:pwest@hao.ucar.edu">pwest.nosp@m.@hao.nosp@m..ucar.nosp@m..edu

Definition at line 71 of file CmdClient.h.

Constructor & Destructor Documentation

◆ CmdClient()

CmdClient::CmdClient ( )
inline

Definition at line 84 of file CmdClient.h.

Member Function Documentation

◆ dump()

virtual void CmdClient::dump ( std::ostream & strm) const
virtual

dump the contents of this object to the specified ostream

This method is implemented by all derived classes to dump their contents, in other words, any state they might have, private variables, etc...

The inline function below can be used to dump the contents of an OPeNDAPObj object. For example, the object Animal is derived from BESObj. A user could do the following:

Animal *a = new dog( "Sparky" ) ; cout << a << endl ;

And the dump method for dog could display the name passed into the constructor, the (this) pointer of the object, etc...

Parameters
strmC++ i/o stream to dump the object to

Implements BESObj.


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