Lionel Cons > Messaging-Message-1.4 > Messaging::Message::Queue::NULL

Download:
Messaging-Message-1.4.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
View/Report Bugs
Module Version: 1.4   Source   Latest Release: Messaging-Message-1.5

NAME ^

Messaging::Message::Queue::NULL - abstraction of a Directory::Queue::Null message queue

SYNOPSIS ^

  use Messaging::Message;
  use Messaging::Message::Queue::NULL;

  # create a message queue
  $mq = Messaging::Message::Queue::NULL->new();

  # add a message to the queue
  $msg = Messaging::Message->new(body => "hello world");
  $mq->add_message($msg);

DESCRIPTION ^

This module provides an abstraction of a message queue. It derives from the Directory::Queue::Null module that provides a generic "black hole" queue: added messages will disappear immediately so the queue will therefore always appear empty.

METHODS ^

In addition to the methods inherited from Directory::Queue::Null, the following methods are available:

new(OPTIONS)

return a new Messaging::Message::Queue::NULL object (class method)

add_message(MESSAGE)

add the given message (a Messaging::Message object) to the queue, this does nothing

get_message(ELEMENT)

get the message from the given element, this generates an error

SEE ALSO ^

Directory::Queue::Null, Messaging::Message, Messaging::Message::Queue.

AUTHOR ^

Lionel Cons http://cern.ch/lionel.cons

Copyright CERN 2012

syntax highlighting: