#include <xmltooling/util/ReloadableXMLFile.h>
Inheritance diagram for xmltooling::ReloadableXMLFile:
Public Member Functions | |
Lockable * | lock () |
Lock the associated object for exclusive access. | |
void | unlock () |
Unlock the associated object from exclusive access. | |
Protected Member Functions | |
ReloadableXMLFile (const xercesc::DOMElement *e, logging::Category &log) | |
Constructor taking a DOM element supporting the following content:. | |
virtual std::pair< bool, xercesc::DOMElement * > | load () |
Loads configuration material. | |
Protected Attributes | |
const xercesc::DOMElement * | m_root |
Root of the original DOM element passed into constructor. | |
bool | m_local |
Indicates whether resources is local or remote. | |
bool | m_validate |
Use a validating parser when parsing XML. | |
std::string | m_source |
Resource location, may be a local path or a URI. | |
std::string | m_backing |
Path to backup copy for remote resources. | |
time_t | m_filestamp |
Last modification of local resource or reload of remote resource. | |
time_t | m_reloadInterval |
Time in seconds to wait before trying for new copy of remote resource. | |
RWLock * | m_lock |
Shared lock for guarding reloads. | |
logging::Category & | m_log |
Logging object. |
xmltooling::ReloadableXMLFile::ReloadableXMLFile | ( | const xercesc::DOMElement * | e, | |
logging::Category & | log | |||
) | [protected] |
Constructor taking a DOM element supporting the following content:.
e | DOM to supply configuration | |
log | logging object to use |
virtual std::pair<bool,xercesc::DOMElement*> xmltooling::ReloadableXMLFile::load | ( | ) | [inline, protected, virtual] |
Loads configuration material.
This method is called to load configuration material initially and any time a change is detected. The base version performs basic parsing duties and returns the result.
Lockable* xmltooling::ReloadableXMLFile::lock | ( | ) | [virtual] |
Lock the associated object for exclusive access.
Implements xmltooling::Lockable.