Name

Bric::Util::Trans::Jabber - Utility class for sending instant messages.

Synopsis

use Bric::Util::Trans::Jabber;
my $j = Bric::Util::Trans::Jabber->new(
  { to      => ['jchaddickerson@aol.jabber.org'],
    subject => 'Greetings',
    message => 'This is an instant message sent via Bric::Util::Trans::Jabber'
   });
$j->send;

Description

This class provides a thin abstraction to the Net::Jabber module. Use it to send instant messages from within Bricolage applications.

Interface

Constructors

my $j = Bric::Util::Trans::Jabber->new($init)

Instantiates a Bric::Util::Trans::Jabber object. An anonymous of initial values may be passed. The supported intial value keys are:

Throws:

Side Effects: NONE.

Notes: NONE.

Destructors

$org->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

my $to_aref = $j->get_to

Returns an anonymous array of addresses to which to send the instant message.

Throws:

Side Effects: NONE.

Notes: NONE.

$self = $j->set_to($to_aref)

Sets the list of addresses to which to send the instant message. Pass in the list as an anonymous array.

Throws:

Side Effects: NONE.

Notes: NONE.

my $sub = $j->get_subject

Returns the subject of the instant message.

Throws:

Side Effects: NONE.

Notes: NONE.

$self = $j->set_subject($sub)

Sets subject of the instant message.

Throws:

Side Effects: NONE.

Notes: NONE.

my $msg = $j->get_message

Returns the message (body) of the instant message.

Throws:

Side Effects: NONE.

Notes: NONE.

$self = $j->set_message($msg)

Sets message (body) of the instant message.

Throws:

Side Effects: NONE.

Notes: NONE.

$self = $j->send

Sends the instant message to the addresses stored in to.

Throws:

Side Effects: NONE.

Notes: NONE.

Private

Private Class Methods

NONE.

Private Instance Methods

NONE.

Private Functions

NONE.

Notes

NONE.

Author

David Wheeler <david@justatheory.com>

See Also

Bric, Net::Jabber