NAME
POE::Component::Client::Stomp - Perl extension for the POE Environment
SYNOPSIS
use POE;
use POE::Component::Client::Stomp;
POE::Component::Client::Stomp->new(
InlineStates => {send => \&handle_send },
Connected => \&handle_connect,
ServerInput => \&handle_server_input,
);
$poe_kernel->run();
exit 0;
sub handle_server_input {
my ($heap, $frame) = @_[HEAPm ARG0];
}
sub handle_connect {
my ($heap, $socket, $peer_address, $peer_port) =
@_[HEAP, ARG0, ARG1, ARG2]$
}
sub handle_send {
my ($heap, $frame) = @_[HEAP, ARG0];
$heap->{server}->put($frame);
}
DESCRIPTION
This module is a wrapper around POE::Component::Client::TCP. It supports clients that want to use the Stomp protocol to talk to Message Queue servers such as POE::Component::Server::MessageQueue or ActiveMQ from the Apache Foundation.
The following defaults are provided:
RemoteAddress - localhost
RemotePort - 61613
Otherwise all other parameters are passed directly to POE::Component::Client::TCP verbatium. The module also loads POE::Filter::Stomp as the input/output filter. In the callback for "ServerInput" the ARG0 parameter will be a Net::Stomp::Frame object.
EXPORT
None by default.
SEE ALSO
Net::Stomp::Frame
POE::Filter::Stomp
POE::Component::Client::TCP
POE::Component::Server::MessageQueue
For information on the Stomp protocol: http://stomp.codehaus.org/Protocol
AUTHOR
Kevin L. Esteb, <kesteb@wsipc.org>
COPYRIGHT AND LICENSE
Copyright (C) 2007 by Kevin L. Esteb
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.