Bric::Dist::Client(3p)

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

VERSION
$LastChangedRevision$

DATE
$LastChangedDate: 2006-03-18 01:26:34 +0100 (Sat, 18 Mar 2006) $

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:

    •   Incorrect number of args to Bric::_set().

    •   Bric::set() - Problems setting fields.

    •   Bric::_get() - Problems retrieving fields.

    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:

    •   Bad AUTOLOAD method format.

    •   Cannot AUTOLOAD private methods.

    •   Access denied: READ access for field 'url' required.

    •   No AUTOLOAD method.

    Side Effects: NONE.

    Notes: NONE.

$self = $dist->set_url($url)
    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.

my $cookie = $dist->get_cookie
    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.

$self = $dist->set_cookie($cookie)
    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.

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:

    •   Bric::_get() - Problems retrieving fields.

    •   Error sending jobs to distributor.

    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