« lib/POE/Component/MessageQueue/IDGenerator/UUID.pm
↑ Summary
lib/POE/Component/MessageQueue/IDGenerator.pm »
| 1 | # | ||
| 2 | # Copyright 2007 Paul Driver <frodwith@gmail.com> | ||
| 3 | # | ||
| 4 | # This program is free software: you can redistribute it and/or modify | ||
| 5 | # it under the terms of the GNU General Public License as published by | ||
| 6 | # the Free Software Foundation, either version 2 of the License, or | ||
| 7 | # (at your option) any later version. | ||
| 8 | # | ||
| 9 | # This program is distributed in the hope that it will be useful, | ||
| 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | # GNU General Public License for more details. | ||
| 13 | # | ||
| 14 | # You should have received a copy of the GNU General Public License | ||
| 15 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 16 | # | ||
| 17 | |||
| 18 | package POE::Component::MessageQueue::Destination; | ||
| 19 | 18 | ▶ | use Moose::Role; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 20 | |||
| 21 | 18 | has parent => ( | |
| 22 | is => 'ro', | ||
| 23 | required => 1, | ||
| 24 | handles => [qw(log notify storage dispatch_message)], | ||
| 25 | ); | ||
| 26 | |||
| 27 | has subscriptions => ( | ||
| 28 | is => 'rw', | ||
| 29 | isa => 'HashRef[POE::Component::MessageQueue::Subscription]', | ||
| 30 | 4 | ▶ | default => sub { {} }, |
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||
| 31 | 18 | traits => ['Hash'], | |
| 32 | handles => { | ||
| 33 | 'set_subscription' => 'set', | ||
| 34 | 'get_subscription' => 'get', | ||
| 35 | 'delete_subscription' => 'delete', | ||
| 36 | 'all_subscriptions' => 'values', | ||
| 37 | }, | ||
| 38 | ); | ||
| 39 | |||
| 40 | 18 | has name => ( | |
| 41 | is => 'ro', | ||
| 42 | required => 1, | ||
| 43 | ); | ||
| 44 | |||
| 45 | 18 | requires qw(send is_persistent pump shutdown); | |
| 46 | |||
| 47 | 18 | 1; | |
| 48 | |||