Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members  

LcgInfo::LcgInfoInterface Class Reference

Main class of the generic API to the LCG Information System. More...

#include <LcgInfoInterface.h>

List of all members.

Public Methods

 LcgInfoInterface ()
 Constructor of the class.

 ~LcgInfoInterface ()
 Destructor of the class.

void initialize (std::string const &pConfFile="lcgInfo.conf")
 Makes the object read the specified configuration file and register all the necessary libraries for the interfaces specified in the configuration. More...

void initialize (LcgConfigBuffer::ConfigBuffer &pConf)
 Makes the object read the specified configuration object and register all the necessary libraries for the interfaces specified in the configuration. More...

Querierconnect ()
 Establish the connection with the default interface (the first specified in the configuration file) and returns a pointer to an appropriate Querier object that can be used to query this interface. More...

Querierconnect (std::string const &mIface)
 Establish the connection with the specified interface (which has necessarily been specified in the configuration file) and returns a pointer to an appropriate Querier object that can be used to query this interface. More...

void disconnect (std::string const &pIface, Querier *pIfaceHandler)
 Closes the connection with the interface for which this Querier was set (using the LcgInfo::connect() method). More...


Detailed Description

Main class of the generic API to the LCG Information System.

This class must be used in order to get an interface to query one of the information systems of LCG (actually, it could also be extended to query other kind of information systems). The application using this API should instantiate an object of type LcgInfoInterface, should invoke the initialize() method, using the adequate configuration file, and should retrieve a pointer to the appropriate interface (Querier object) by calling the connect() method. When the interface is no longer needed, it should be destroyed with the disconnect() method.

See also:
Querier
Author:
LCG's EIS Group. CERN.
Version:
1.0
Date:
2004

Definition at line 39 of file LcgInfoInterface.h.


Member Function Documentation

Querier * LcgInfoInterface::connect std::string const &    mIface
 

Establish the connection with the specified interface (which has necessarily been specified in the configuration file) and returns a pointer to an appropriate Querier object that can be used to query this interface.

It may throw a LcgInfoException if the connection cannot be established. IMPORTANT: Currently, this method just perform some checking, but the actual connection to an interface is performed when the Querier.query() method is called.

Definition at line 88 of file LcgInfoInterface.cpp.

References LcgConfigBuffer::ConfigBuffer::create_new_attribute, LcgInfo::create_Querier, LcgInfo::destroy_Querier, LcgConfigBuffer::ConfigBuffer::get_attribute_value, LcgInfo::int2str, libfactory::LibFactory::LibCreate, LcgConfigBuffer::ConfigBuffer::list_attributes, and LcgConfigBuffer::ConfigBuffer::set_attribute_value.

Querier * LcgInfoInterface::connect  
 

Establish the connection with the default interface (the first specified in the configuration file) and returns a pointer to an appropriate Querier object that can be used to query this interface.

It may throw a LcgInfoException if there is no default interface defined or if the connection cannot be established. IMPORTANT: Currently, this method just perform some checking, but the actual connection to an interface is performed when the Querier.query() method is called.

Definition at line 83 of file LcgInfoInterface.cpp.

void LcgInfoInterface::disconnect std::string const &    pIface,
Querier   pIfaceHandler
 

Closes the connection with the interface for which this Querier was set (using the LcgInfo::connect() method).

It destroys the object pointed by the specified pIfaceHandler, so this pointer cannot be used again. IMPORTANT: Currently, this method just perform some checking, but the actual disconnection from an interface is performed when the Querier::query() method returns.

Definition at line 155 of file LcgInfoInterface.cpp.

void LcgInfoInterface::initialize LcgConfigBuffer::ConfigBuffer   pConf
 

Makes the object read the specified configuration object and register all the necessary libraries for the interfaces specified in the configuration.

It is responsability of the caller to create (and keep) the pConf object. It may throw a LcgInfoException if there are errors in the described process.

Parameters:
pConf  the object with the configuration information

Definition at line 24 of file LcgInfoInterface.cpp.

void LcgInfoInterface::initialize std::string const &    pConfFile = "lcgInfo.conf"
 

Makes the object read the specified configuration file and register all the necessary libraries for the interfaces specified in the configuration.

If no argument is given, the default file "lcgInfo.conf" is used. It may throw a LcgInfoException if there are errors in the described process.

Parameters:
pConfFile  the configuration file to be read

Definition at line 29 of file LcgInfoInterface.cpp.

References LcgConfigBuffer::ConfigBuffer::populate_from_config.


The documentation for this class was generated from the following files:
Generated on Tue Oct 5 14:42:45 2004 for LCG Information System Interface by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002