OPeNDAP Hyrax Back End Server (BES)  Updated for version 3.8.3
GatewayContainer Class Reference

Container representing a remote request. More...

#include <GatewayContainer.h>

Inheritance diagram for GatewayContainer:
Inheritance graph
Collaboration diagram for GatewayContainer:
Collaboration graph

Public Member Functions

virtual string access ()
 access the remote target response by making the remote request More...
 
virtual void dump (ostream &strm) const
 dumps information about this object More...
 
 GatewayContainer (const string &sym_name, const string &real_name, const string &type)
 Creates an instances of GatewayContainer with symbolic name and real name, which is the remote request. More...
 
 GatewayContainer (const GatewayContainer &copy_from)
 
string get_attributes () const
 retrieve the attributes desired from this container More...
 
string get_constraint () const
 retrieve the constraint expression for this container More...
 
string get_container_type () const
 retrieve the type of data this container holds, such as cedar or netcdf. More...
 
string get_dap4_constraint () const
 retrieve the constraint expression for this container More...
 
string get_dap4_function () const
 retrieve the constraint expression for this container More...
 
string get_real_name () const
 retrieve the real name for this container, such as a file name. More...
 
string get_symbolic_name () const
 retrieve the symbolic name for this container More...
 
virtual BESContainerptr_duplicate ()
 pure abstract method to duplicate this instances of BESContainer More...
 
virtual bool release ()
 release the resources More...
 
void set_attributes (const string &attrs)
 set desired attributes for this container More...
 
void set_constraint (const string &s)
 set the constraint for this container More...
 
void set_container_type (const string &type)
 set the type of data that this container represents, such as cedar or netcdf. More...
 
void set_dap4_constraint (const string &s)
 set the constraint for this container More...
 
void set_dap4_function (const string &s)
 set the constraint for this container More...
 
void set_real_name (const string &real_name)
 set the real name for this container, such as a file name if reading a data file. More...
 
virtual ~GatewayContainer ()
 

Protected Member Functions

void _duplicate (GatewayContainer &copy_to)
 
void _duplicate (BESContainer &copy_to)
 duplicate this instance into the passed container More...
 

Detailed Description

Container representing a remote request.

The real name of a GatewayContainer is the actual remote request. When the access method is called the remote request is made, the response saved to file if successfull, and the target response returned as the real container that a data handler would then open.

See also
GatewayContainerStorage

Definition at line 56 of file GatewayContainer.h.

Constructor & Destructor Documentation

GatewayContainer::GatewayContainer ( const string &  sym_name,
const string &  real_name,
const string &  type 
)

Creates an instances of GatewayContainer with symbolic name and real name, which is the remote request.

The real_name is the remote request URL.

Parameters
sym_namesymbolic name representing this remote container
real_namethe remote request URL
Exceptions
BESSyntaxUserErrorif the url does not validate
See also
GatewayUtils

Definition at line 56 of file GatewayContainer.cc.

References BESUtil::url::psswd, BESContainer::set_container_type(), BESUtil::url::uname, BESUtil::url_create(), BESUtil::url_explode(), and GatewayUtils::WhiteList.

Here is the call graph for this function:

GatewayContainer::GatewayContainer ( const GatewayContainer copy_from)

Definition at line 86 of file GatewayContainer.cc.

GatewayContainer::~GatewayContainer ( )
virtual

Definition at line 114 of file GatewayContainer.cc.

References release().

Here is the call graph for this function:

Member Function Documentation

void GatewayContainer::_duplicate ( GatewayContainer copy_to)
protected

Definition at line 97 of file GatewayContainer.cc.

References BESContainer::_duplicate().

Referenced by ptr_duplicate().

Here is the call graph for this function:

void BESContainer::_duplicate ( BESContainer copy_to)
protectedinherited

duplicate this instance into the passed container

Parameters
copy_toThe container to copy this instance into

Definition at line 50 of file BESContainer.cc.

Referenced by NCMLContainer::_duplicate(), _duplicate(), BESFileContainer::_duplicate(), and BESFileContainer::ptr_duplicate().

string GatewayContainer::access ( )
virtual

access the remote target response by making the remote request

Returns
full path to the remote request response data file
Exceptions
BESErrorif there is a problem making the remote request

Implements BESContainer.

Definition at line 125 of file GatewayContainer.cc.

References BESDEBUG, BESContainer::get_container_type(), BESCache3::get_instance(), BESContainer::get_real_name(), gateway::RemoteHttpResource::getCacheFileName(), gateway::RemoteHttpResource::getType(), gateway::RemoteHttpResource::retrieveResource(), BESContainer::set_container_type(), and TheBESKeys::TheKeys().

Here is the call graph for this function:

void GatewayContainer::dump ( ostream &  strm) const
virtual

dumps information about this object

Displays the pointer value of this instance along with information about this container.

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

Reimplemented from BESContainer.

Definition at line 192 of file GatewayContainer.cc.

References BESContainer::dump(), gateway::RemoteHttpResource::getCacheFileName(), gateway::RemoteHttpResource::getResponseHeaders(), BESIndent::Indent(), BESIndent::LMarg(), and BESIndent::UnIndent().

Here is the call graph for this function:

string BESContainer::get_attributes ( ) const
inlineinherited

retrieve the attributes desired from this container

Returns
attributes desired from this container

Definition at line 217 of file BESContainer.h.

string BESContainer::get_constraint ( ) const
inlineinherited
string BESContainer::get_container_type ( ) const
inlineinherited

retrieve the type of data this container holds, such as cedar or netcdf.

Returns
type of data this container represents, such as cedar or netcdf

Definition at line 208 of file BESContainer.h.

Referenced by access(), BESContainerStorageVolatile::add_container(), BESRequestHandlerList::execute_current(), FONcTransform::FONcTransform(), BESContainerStorageVolatile::isData(), BESContainerStorageFile::isData(), and BESContainerStorageVolatile::show_containers().

string BESContainer::get_dap4_constraint ( ) const
inlineinherited

retrieve the constraint expression for this container

Returns
constraint expression for this execution for the symbolic name

Definition at line 179 of file BESContainer.h.

Referenced by BESDapResponse::set_dap4_constraint().

string BESContainer::get_dap4_function ( ) const
inlineinherited

retrieve the constraint expression for this container

Returns
constraint expression for this execution for the symbolic name

Definition at line 188 of file BESContainer.h.

Referenced by BESDapResponse::set_dap4_function().

string BESContainer::get_real_name ( ) const
inlineinherited

retrieve the real name for this container, such as a file name.

Returns
real name, such as file name

Definition at line 161 of file BESContainer.h.

Referenced by access(), BESFileContainer::access(), BESRequestHandlerList::execute_current(), and BESContainerStorageVolatile::show_containers().

BESContainer * GatewayContainer::ptr_duplicate ( )
virtual

pure abstract method to duplicate this instances of BESContainer

Implements BESContainer.

Definition at line 108 of file GatewayContainer.cc.

References _duplicate().

Here is the call graph for this function:

bool GatewayContainer::release ( )
virtual

release the resources

Release the resource

Returns
true if the resource is released successfully and false otherwise

Implements BESContainer.

Definition at line 174 of file GatewayContainer.cc.

References BESDEBUG.

Referenced by ~GatewayContainer().

void BESContainer::set_attributes ( const string &  attrs)
inlineinherited

set desired attributes for this container

Parameters
attrsattributes desired to access for this container

Definition at line 151 of file BESContainer.h.

Referenced by BESXMLDefineCommand::prep_request().

void BESContainer::set_constraint ( const string &  s)
inlineinherited
void BESContainer::set_container_type ( const string &  type)
inlineinherited

set the type of data that this container represents, such as cedar or netcdf.

Parameters
typetype of data, such as cedar or netcdf

Definition at line 142 of file BESContainer.h.

Referenced by access(), and GatewayContainer().

void BESContainer::set_dap4_constraint ( const string &  s)
inlineinherited

set the constraint for this container

Parameters
sconstraint

Definition at line 113 of file BESContainer.h.

Referenced by BESXMLDefineCommand::prep_request().

void BESContainer::set_dap4_function ( const string &  s)
inlineinherited

set the constraint for this container

Parameters
sconstraint

Definition at line 122 of file BESContainer.h.

Referenced by BESXMLDefineCommand::prep_request().

void BESContainer::set_real_name ( const string &  real_name)
inlineinherited

set the real name for this container, such as a file name if reading a data file.

Parameters
real_namereal name, such as the file name

Definition at line 132 of file BESContainer.h.


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