NAME

POE::Request::Emit - encapsulates non-terminal replies to POE::Request

SYNOPSIS

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

$poe_request_object->emit(
	type        => "failure",
	args        => {
		function  => "connect",
		errnum    => $!+0,
		errstr    => "$!",
	},
);

DESCRIPTION

A POE::Request::Emit object is used to send an intermediate response to a request. It is internally created and sent when a stage calls $self->{req}->emit(...).

An emitted reply does not cancel the request it is in response to. A stage may therefore emit multiple messages for a single request, finally calling return() or cancel() to end the request.

recall PAIRS

The stage receiving an emit()ted message may call recall() on it to continue the dialogue after emit(). recall() sends a new POE::Request::Recall message back to the stage that called emit(). In this way, emit() and recall() can be used to continue a persistent dialogue between two stages.

Once constructed, the recall message is automatically sent to the source of the POE::Request::Emit object.

The PAIRS of parameters to recall() are for the most part passed through to POE::Request::Recall's constructor. You'll need to see POE::Request::Recall for details about recall messages.

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::Recall, and probably POE::Stage.

AUTHORS

Rocco Caputo <rcaputo@cpan.org>.

LICENSE

POE::Request::Emit 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.