Name

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

Synopsis

use Bric::Dist::Client;

my $dist = Bric::Dist::Client->new;

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 sends a tickle request to the Bricolage distribution server, which is running Bric::Dist::Handler. It is principally used used by bric_dist_mon to publish and distribute files.

Interface

Constructors

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

Instantiates a Bric::Dist::Client object.

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

Note: Deprecated. No need to call it anymore, as it is now a no-op.

Throws: NONE.

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 $timeout = $dist->get_timeout

Returns the distribution server request timeout. This is the amount of time, in seconds, that the client should wait for a response from the distribution server before timing out. Defaults to 30 if not set.

Throws:

Side Effects: NONE.

Notes: NONE.

$self = $dist->set_timeout($timeout)
$dist->set_timeout(60);

Sets the distribution server request timeout.

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

Note: Deprecated. No need to call it anymore. Will return an empty list or array reference.

Throws: NONE.

Side Effects: NONE.

Notes: NONE.

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

Note: Deprecated. No need to call it anymore. All arguments will simply be discarded.

Throws: NONE.

Side Effects: NONE.

Notes: NONE.

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

Note: Deprecated. No need to call it anymore. All arguments will simply be discarded.

Throws: NONE.

Side Effects: NONE.

Notes: NONE.

$self = $dist->send

Sends a tickle request 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@justatheory.com>

See Also

Bric