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

implementation of BESContainerStorageVolatile that represents a list of remote requests More...

#include <GatewayContainerStorage.h>

Inheritance diagram for GatewayContainerStorage:
Inheritance graph
Collaboration diagram for GatewayContainerStorage:
Collaboration graph

Public Types

typedef map< string, BESContainer * >::const_iterator Container_citer
 
typedef map< string, BESContainer * >::iterator Container_iter
 

Public Member Functions

virtual void add_container (const string &s_name, const string &r_name, const string &type)
 adds a container with the provided information More...
 
virtual bool del_container (const string &s_name)
 removes a container with the given symbolic name from the list and deletes it. More...
 
virtual bool del_containers ()
 removes all container More...
 
virtual void dump (ostream &strm) const
 dumps information about this object More...
 
 GatewayContainerStorage (const string &n)
 create an instance of this persistent store with the given name. More...
 
virtual const string & get_name () const
 retrieve the name of this persistent store More...
 
virtual bool isData (const string &inQuestion, list< string > &provides)
 determine if the given container is data and what servies are available for it More...
 
virtual BESContainerlook_for (const string &sym_name)
 looks for the specified container using the symbolic name passed More...
 
virtual void show_containers (BESInfo &info)
 show information for each container in this persistent store More...
 
virtual ~GatewayContainerStorage ()
 

Protected Member Functions

virtual void add_container (BESContainer *c)
 add the passed container to the list of containers in volatile storage More...
 
virtual void show_container (const string &sym_name, const string &real_name, const string &type, BESInfo &info)
 add information for a container to the informational response object More...
 

Protected Attributes

bool _follow_sym_links
 
string _my_name
 
string _root_dir
 

Detailed Description

implementation of BESContainerStorageVolatile that represents a list of remote requests

Each of the containers stored in the GatewayContainerStorage represents a remote request. When accessed the container will make the remote request in order to create the target response.

See also
BESContainerStorageVolatile
GatewayContainer

Definition at line 54 of file GatewayContainerStorage.h.

Member Typedef Documentation

typedef map<string, BESContainer *>::const_iterator BESContainerStorageVolatile::Container_citer
inherited

Definition at line 69 of file BESContainerStorageVolatile.h.

typedef map<string, BESContainer *>::iterator BESContainerStorageVolatile::Container_iter
inherited

Definition at line 70 of file BESContainerStorageVolatile.h.

Constructor & Destructor Documentation

GatewayContainerStorage::GatewayContainerStorage ( const string &  n)

create an instance of this persistent store with the given name.

Creates an instances of GatewayContainerStorage with the given name.

Parameters
nname of this persistent store
See also
GatewayContainer

Definition at line 43 of file GatewayContainerStorage.cc.

GatewayContainerStorage::~GatewayContainerStorage ( )
virtual

Definition at line 48 of file GatewayContainerStorage.cc.

Member Function Documentation

void GatewayContainerStorage::add_container ( const string &  s_name,
const string &  r_name,
const string &  type 
)
virtual

adds a container with the provided information

Parameters
s_namesymbolic name for the container
r_namethe remote request url
typeignored. The type of the target response is determined by the request response, or could be passed in

Reimplemented from BESContainerStorageVolatile.

Definition at line 59 of file GatewayContainerStorage.cc.

References BESContainerStorageVolatile::add_container().

Here is the call graph for this function:

void BESContainerStorageVolatile::add_container ( BESContainer c)
protectedvirtualinherited

add the passed container to the list of containers in volatile storage

This method adds the passed container to the list of volatile containers. The passed container is owned by the list if added and should not be deleted by the caller.

If a container with the symbolic name of the passed container is already in the list then an exception is thrown.

Parameters
ccontainer to add to the list
Exceptions
BESContainerStorageExcpetionif the passed container is null
BESContainerStorageExcpetionif no type is specified in the passed container
BESContainerStorageExcpetionif a container with the passed symbolic name already exists.

Definition at line 173 of file BESContainerStorageVolatile.cc.

References BESContainer::get_container_type(), and BESContainer::get_symbolic_name().

Referenced by add_container(), NCMLContainerStorage::add_container(), and BESContainerStorageCatalog::add_container().

Here is the call graph for this function:

bool BESContainerStorageVolatile::del_container ( const string &  s_name)
virtualinherited

removes a container with the given symbolic name from the list and deletes it.

Parameters
s_namesymbolic name for the container
Returns
true if successfully removed and false otherwise

Implements BESContainerStorage.

Definition at line 199 of file BESContainerStorageVolatile.cc.

bool BESContainerStorageVolatile::del_containers ( )
virtualinherited

removes all container

This method removes all containers from the persistent store. It does not delete the real data behind the container.

Returns
true if successfully removed and false otherwise

Implements BESContainerStorage.

Definition at line 222 of file BESContainerStorageVolatile.cc.

Referenced by BESContainerStorageVolatile::~BESContainerStorageVolatile().

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

dumps information about this object

Displays the pointer value of this instance along with information about each of the GatewayContainers already stored.

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

Reimplemented from BESContainerStorageVolatile.

Definition at line 72 of file GatewayContainerStorage.cc.

References BESContainerStorageVolatile::dump(), BESIndent::Indent(), BESIndent::LMarg(), and BESIndent::UnIndent().

Here is the call graph for this function:

virtual const string& BESContainerStorage::get_name ( ) const
inlinevirtualinherited
bool BESContainerStorageVolatile::isData ( const string &  inQuestion,
list< string > &  provides 
)
virtualinherited

determine if the given container is data and what servies are available for it

Parameters
inQuestionthe container in question
providesan output parameter for storing the list of services provided for this container

Implements BESContainerStorage.

Reimplemented in BESContainerStorageCatalog.

Definition at line 242 of file BESContainerStorageVolatile.cc.

References BESContainer::get_container_type(), BESContainerStorageVolatile::look_for(), BESServiceRegistry::services_handled(), and BESServiceRegistry::TheRegistry().

Here is the call graph for this function:

BESContainer * BESContainerStorageVolatile::look_for ( const string &  sym_name)
virtualinherited

looks for the specified container using the symbolic name passed

If a match is made with the symbolic name then the stored container is duplicated and returned to the user. If not, 0 is returned.

Parameters
sym_namesymbolic name of the container to look for
Returns
a new BESContainer instance using the ptr_duplicate method on BESContainer

Implements BESContainerStorage.

Definition at line 86 of file BESContainerStorageVolatile.cc.

References BESContainer::ptr_duplicate().

Referenced by BESContainerStorageVolatile::isData().

Here is the call graph for this function:

void BESContainerStorage::show_container ( const string &  sym_name,
const string &  real_name,
const string &  type,
BESInfo info 
)
protectedvirtualinherited

add information for a container to the informational response object

Parameters
sym_namesymbolic name of the container to add
real_namereal name, e.g. file name, of the container to add
typedata type of the container
infoThe BES information object to add container information to
See also
BESInfo

Definition at line 45 of file BESContainerStorage.cc.

References BESInfo::add_tag().

Referenced by BESContainerStorageVolatile::show_containers(), and BESContainerStorageFile::show_containers().

Here is the call graph for this function:

void BESContainerStorageVolatile::show_containers ( BESInfo info)
virtualinherited

show information for each container in this persistent store

For each container in this persistent store, add infomation about each of those containers. The information added to the information object includes a line for each container within this persistent store which includes the symbolic name, the real name, and the data type, separated by commas.

In the case of this persistent store information from each container added to the volatile list is added to the information object.

Parameters
infoobject to store the container and persistent store information
See also
BESInfo

Implements BESContainerStorage.

Definition at line 268 of file BESContainerStorageVolatile.cc.

References BESContainerStorageVolatile::_root_dir, BESInfo::add_tag(), BESContainer::get_container_type(), BESContainerStorage::get_name(), BESContainer::get_real_name(), BESContainer::get_symbolic_name(), and BESContainerStorage::show_container().

Here is the call graph for this function:

Member Data Documentation

bool BESContainerStorageVolatile::_follow_sym_links
protectedinherited
string BESContainerStorage::_my_name
protectedinherited

Definition at line 71 of file BESContainerStorage.h.

Referenced by BESContainerStorage::get_name().


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