Bric::Dist::Client - LWP Client for telling Bric::Dist::Handler to execute distribution jobs.
$Revision: 1.7 $
$Date: 2002/02/19 23:53:44 $
use Bric::Dist::Client;
my $dist = Bric::Dist::Client->new;
$dist->load_ids;
my @exec_ids = $dist->get_exec_ids;
$dist->add_exec_ids(@exec_ids);
$dist->del_exec_ids(@exec_ids);
my $url = $dist->get_url;
$dist = $dist->set_url($url);
my $cookie = $dist->get_cookie;
$dist = $dist->set_cookie($cookie);
$dist->send;
This class functions as a client to the distribution server. It will load the lists of job IDs to be executed and send them via lwp to the distribution server, which is running Bric::Dist::Handler. It is principally used to distribute files for preview, and by dist_mon to distribute files for publication.
Instantiates a Bric::Dist::Client object. An anonymous hash of initial values may be passed. The supported initial value keys are:
exec_ids - An anonymous array of Bric::Dist::Job IDs to be executed.
exp_ids - An anonymous array of Bric::Dist::Job IDs to be expired.
Throws:
Incorrect number of args to Bric::_set().
Bric::set() - Problems setting fields.
Bric::_get() - Problems retrieving fields.
Cannot add resources to a completed job.
Cannot add resources to a pending job.
Side Effects: NONE.
Notes: NONE.
Dummy method to prevent wasting time trying to AUTOLOAD DESTROY.
Throws: NONE.
Side Effects: NONE.
Notes: NONE.
NONE.
Looks up the IDs of all Bric::Dist::Job objects in the database that are ready to be executed or expired and populates the properties of this object with those IDs.
Throws:
Bric::_get() - Problems retrieving fields.
Unable to connect to database.
Unable to prepare SQL statement.
Unable to select column into arrayref.
Unable to execute SQL statement.
Unable to bind to columns to statement handle.
Unable to fetch row from statement handle.
Side Effects: NONE.
Notes: NONE.
Returns the Distribution server URL.
Throws:
Bad AUTOLOAD method format.
Cannot AUTOLOAD private methods.
Access denied: READ access for field 'url' required.
No AUTOLOAD method.
Side Effects: NONE.
Notes: NONE.
Sets the distribution server URL.
$dist->set_url('http://cf.about.com/dist/');
Throws:
Bad AUTOLOAD method format.
Cannot AUTOLOAD private methods.
Access denied: WRITE access for field 'url' required.
No AUTOLOAD method.
Side Effects: NONE.
Notes: NONE.
Returns the Distribution server cookie.
Throws:
Bad AUTOLOAD method format.
Cannot AUTOLOAD private methods.
Access denied: READ access for field 'cookie' required.
No AUTOLOAD method.
Side Effects: NONE.
Notes: NONE.
Sets the distribution server cookie. If no cookie is set, then none will be sent.
Throws:
Bad AUTOLOAD method format.
Cannot AUTOLOAD private methods.
Access denied: WRITE access for field 'cookie' required.
No AUTOLOAD method.
Side Effects: NONE.
Notes: NONE.
Returns a list anonymous array of Bric::Dist::Job IDs to be executed.
Throws:
Bric::_get() - Problems retrieving fields.
Side Effects: NONE.
Notes: NONE.
Adds to the list of Bric::Dist::Job IDs to be executed.
Throws:
Bric::_get() - Problems retrieving fields.
Side Effects: NONE.
Notes: NONE.
Deletes from the list of Bric::Dist::Job IDs to be executed. If no exec IDs are passed, they will all be deleted.
Throws:
Bric::_get() - Problems retrieving fields.
Side Effects: NONE.
Notes: NONE.
Sends the lists of Bric::Dist::Job IDs to be expired to the distribution server.
Throws:
Bric::_get() - Problems retrieving fields.
Error sending jobs to distributor.
Side Effects: NONE.
Notes: NONE.
NONE.
NONE.
NONE.
1; __END__
NONE.
David Wheeler <david@wheeler.net>
Hey! The above document had some coding errors, which are explained below:
=back doesn't take any parameters, but you said =back 4
=back doesn't take any parameters, but you said =back 4