NAME

Bric::Dist::Client - LWP Client for telling Bric::Dist::Handler to execute distribution jobs.

VERSION

$Revision: 1.7 $

DATE

$Date: 2002/02/19 23:53:44 $

SYNOPSIS

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;

DESCRIPTION

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.

INTERFACE

Constructors

my $dist = Bric::Dist::Client->new($init)

Instantiates a Bric::Dist::Client object. An anonymous hash of initial values may be passed. The supported initial value keys are:

Throws:

Side Effects: NONE.

Notes: NONE.

Destructors

$dist->DESTROY

Dummy method to prevent wasting time trying to AUTOLOAD DESTROY.

Throws: NONE.

Side Effects: NONE.

Notes: NONE.

Public Class Methods

NONE.

Public Instance Methods

$dist = $dist->load_ids

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:

Side Effects: NONE.

Notes: NONE.

my $url = $dist->get_url

Returns the Distribution server URL.

Throws:

Side Effects: NONE.

Notes: NONE.

$self = $dist->set_url($url)

Sets the distribution server URL.

$dist->set_url('http://cf.about.com/dist/');

Throws:

Side Effects: NONE.

Notes: NONE.

my $cookie = $dist->get_cookie

Returns the Distribution server cookie.

Throws:

Side Effects: NONE.

Notes: NONE.

$self = $dist->set_cookie($cookie)

Sets the distribution server cookie. If no cookie is set, then none will be sent.

Throws:

Side Effects: NONE.

Notes: NONE.

my (@exec_jids, $exec_jids_aref) = $dist->get_exec_ids

Returns a list anonymous array of Bric::Dist::Job IDs to be executed.

Throws:

Side Effects: NONE.

Notes: NONE.

$self = $dist->add_exec_ids(@exec_ids)

Adds to the list of Bric::Dist::Job IDs to be executed.

Throws:

Side Effects: NONE.

Notes: NONE.

$self = $dist->del_exec_ids(@exec_ids)

Deletes from the list of Bric::Dist::Job IDs to be executed. If no exec IDs are passed, they will all be deleted.

Throws:

Side Effects: NONE.

Notes: NONE.

$self = $dist->send

Sends the lists of Bric::Dist::Job IDs to be expired to the distribution server.

Throws:

Side Effects: NONE.

Notes: NONE.

PRIVATE

Private Class Methods

NONE.

Private Instance Methods

NONE.

Private Functions

NONE.

1; __END__

NOTES

NONE.

AUTHOR

David Wheeler <david@wheeler.net>

SEE ALSO

Bric

POD ERRORS

Hey! The above document had some coding errors, which are explained below:

Around line 173:

=back doesn't take any parameters, but you said =back 4

Around line 515:

=back doesn't take any parameters, but you said =back 4