#include <LcgInfoInterface.h>
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... | |
Querier * | 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. More... | |
Querier * | 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. 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... |
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.
Definition at line 39 of file LcgInfoInterface.h.
|
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. |
|
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. |
|
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. |
|
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.
Definition at line 24 of file LcgInfoInterface.cpp. |
|
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.
Definition at line 29 of file LcgInfoInterface.cpp. References LcgConfigBuffer::ConfigBuffer::populate_from_config. |