NAME

POE::Request::Recall - encapsulates responses to POE::Request::Emit

SYNOPSIS

# Note, this is not a complete program.
# See the distribution's examples directory.

$self->{rsp}->recall(
	method  => "method_name",     # invoke this method on Emit's creator
	args      => {
		param_1 => 123,               # with this parameter
		param_2 => "abc",             # and this one, too
	},
);

DESCRIPTION

POE::Request::Recall objects encapsulate responses to POE::Request::Emit objects. They are not created explicitly; rather, they are created by POE::Request::Emit's recall() method.

They are quite like POE::Request objects, except that they are not created with a "stage" parameter. Rather, the destination stage is the one that originally created the previous POE::Request::Emit object.

Consider this persistent dialogue between two stages:

Requester               Servicer
----------------------- -------------------------
POE::Request->new()     .
.                       $self->{req}->emit()
$self->{rsp}->recall()  .
.                       $self->{req}->return()

A stage requests a service from another stage. The servicing stage emits a response, which is handled by the requester. The requester responds with recall(). The servicing stage handles the new message by calling return(), ending the dialogue.

new PAIRS

Create a new POE::Request::Recall object, specifying the "method" to call in the POE::Stage object on the other end of the dialog. An optional "args" parameter should contain a hashref of key/value pairs that are passed to the destination method as its $args parameter.

BUGS

See http://thirdlobe.com/projects/poe-stage/report/1 for known issues. See http://thirdlobe.com/projects/poe-stage/newticket to report one.

SEE ALSO

POE::Request, POE::Request::Emit, and probably POE::Stage.

AUTHORS

Rocco Caputo <rcaputo@cpan.org>.

LICENSE

POE::Request::Recall is Copyright 2005 by Rocco Caputo. All rights are reserved. You may use, modify, and/or distribute this module under the same terms as Perl itself.