line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Message::Passing::Output::STOMP; |
2
|
1
|
|
|
1
|
|
2716
|
use Moose; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
use namespace::autoclean; |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
with qw/ |
6
|
|
|
|
|
|
|
Message::Passing::STOMP::Role::HasAConnection |
7
|
|
|
|
|
|
|
Message::Passing::Role::Output |
8
|
|
|
|
|
|
|
/; |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
has destination => ( |
11
|
|
|
|
|
|
|
isa => 'Str', |
12
|
|
|
|
|
|
|
is => 'ro', |
13
|
|
|
|
|
|
|
required => 1, |
14
|
|
|
|
|
|
|
); |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
sub connected { |
17
|
|
|
|
|
|
|
my $self = shift; |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub consume { |
21
|
|
|
|
|
|
|
my $self = shift; |
22
|
|
|
|
|
|
|
my $data = shift; |
23
|
|
|
|
|
|
|
my $destination = $self->destination; |
24
|
|
|
|
|
|
|
my $headers = undef; |
25
|
|
|
|
|
|
|
$self->connection_manager->connection->send($data, $destination, $headers); |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
29
|
|
|
|
|
|
|
1; |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
=head1 NAME |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
Message::Passing::Output::STOMP - output messages to STOMP. |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
=head1 SYNOPSIS |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
message-pass --input STDIN --output STOMP --output_options \ |
38
|
|
|
|
|
|
|
'{"destination":"/queue/foo","hostname":"localhost","port":"6163","username":"guest","password":"guest"}' |
39
|
|
|
|
|
|
|
{"data":{"some":"data"},"@metadata":"value"} |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=head1 DESCRIPTION |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
A L<Message::Passing> L<AnyEvent::STOMP> output class. |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=head1 ATTRIBUTES |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=head2 destination |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
The queue name to subscribe to on the server. |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=head2 hostname |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
Server hostname to connect to. |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=head2 port |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
Server port number to connect to (default 6163). |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=head2 username |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
The username to connect with (defaults to 'guest'). |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=head2 password |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
The password to connect with (defaults to 'guest'). |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
=head1 METHODS |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=head2 consume |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
Sends a message. |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
=head2 connected |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
Called by L<Message::Passing::STOMP::ConnectionManager> to indicate a |
76
|
|
|
|
|
|
|
connection to the STOMP server has been made. |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
=head1 SEE ALSO |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
=over |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=item L<Message::Passing::STOMP> |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
=item L<Message::Passing::Input::STOMP> |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
=item L<Message::Passing> |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
=item L<STOMP> |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
=back |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
=head1 AUTHOR, COPYRIGHT AND LICENSE |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
See L<Message::Passing::STOMP>. |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
=cut |
97
|
|
|
|
|
|
|
|