LiveSupport::Scheduler::BackupFactory Class Reference

#include <BackupFactory.h>

Inheritance diagram for LiveSupport::Scheduler::BackupFactory:

[legend]
Collaboration diagram for LiveSupport::Scheduler::BackupFactory:

[legend]
List of all members.

Detailed Description

The factory to create backup objects.

Backup objects are objects which implement the BackupInterface interface, so they can create and restore schedule backups.

This object has to be configured with an element that contains the configuration element that the factory should build. Currently only PostgresqlBackup is supported by this factory.

An example configuration element is the following:


      <backupFactory>
          <postgresqlBackup/>
      </backupFactory>
  

The DTD for the above element is:


  <!ELEMENT backupFactory (postgresqlBackup) >
  

For details on the <postgresqlBackup> element, see the PostgresqlBackup documentation.

Author:
Author
paul
Version:
Revision
2833
See also:
PostgresqlBackup

Definition at line 90 of file BackupFactory.h.

Public Member Functions

virtual ~BackupFactory (void) throw ()
 A virtual destructor, as this class has virtual functions.
virtual void configure (const xmlpp::Element &element) throw (std::invalid_argument, std::logic_error)
 Configure the object based on the XML element supplied.
Ptr< BackupInterface >::Ref getBackup (void) throw ()
 Return a backup.

Static Public Member Functions

static const std::string getConfigElementName (void) throw ()
 Return the name of the XML element this object expects to be sent to a call to configure().
static Ptr< BackupFactory
>::Ref 
getInstance () throw ()
 Returns the singleton instance of this object.


Constructor & Destructor Documentation

virtual LiveSupport::Scheduler::BackupFactory::~BackupFactory ( void   )  throw () [inline, virtual]

A virtual destructor, as this class has virtual functions.

Definition at line 121 of file BackupFactory.h.


Member Function Documentation

void BackupFactory::configure ( const xmlpp::Element &  element  )  throw (std::invalid_argument, std::logic_error) [virtual]

Configure the object based on the XML element supplied.

Parameters:
element the XML element to configure the object from.
Exceptions:
std::invalid_argument if the supplied XML element contains bad configuraiton information
std::logic_error if the object has already been configured, and can not be reconfigured.

Implements LiveSupport::Core::Configurable.

Definition at line 83 of file BackupFactory.cxx.

References LiveSupport::Scheduler::PostgresqlBackup::getConfigElementName(), LiveSupport::Scheduler::ScheduleFactory::getInstance(), LiveSupport::StorageClient::StorageClientFactory::getInstance(), and LiveSupport::Db::ConnectionManagerFactory::getInstance().

Ptr<BackupInterface>::Ref LiveSupport::Scheduler::BackupFactory::getBackup ( void   )  throw () [inline]

Return a backup.

Returns:
the appropriate backup, according to the configuration of this factory.

Definition at line 166 of file BackupFactory.h.

static const std::string LiveSupport::Scheduler::BackupFactory::getConfigElementName ( void   )  throw () [inline, static]

Return the name of the XML element this object expects to be sent to a call to configure().

Returns:
the name of the expected XML configuration element.

Definition at line 132 of file BackupFactory.h.

Referenced by LiveSupport::Scheduler::SchedulerDaemon::configure().

Ptr< BackupFactory >::Ref BackupFactory::getInstance (  )  throw () [static]

Returns the singleton instance of this object.

Returns:
the singleton instance of this object.

Definition at line 69 of file BackupFactory.cxx.

Referenced by LiveSupport::Scheduler::SchedulerDaemon::configure().


The documentation for this class was generated from the following files:
Generated on Thu Sep 20 02:00:43 2007 for Campcaster by  1.4.7