File Coverage

blib/lib/JMX/Jmx4Perl/Product/Resin.pm
Criterion Covered Total %
statement 14 23 60.8
branch 0 2 0.0
condition n/a
subroutine 6 11 54.5
pod 6 6 100.0
total 26 42 61.9


line stmt bran cond sub pod time code
1             #!/usr/bin/perl
2             package JMX::Jmx4Perl::Product::Resin;
3              
4 4     4   30 use JMX::Jmx4Perl::Product::BaseHandler;
  4         11  
  4         126  
5 4     4   20 use strict;
  4         8  
  4         96  
6 4     4   18 use base "JMX::Jmx4Perl::Product::BaseHandler";
  4         48  
  4         346  
7              
8 4     4   26 use Carp qw(croak);
  4         6  
  4         1103  
9              
10             =head1 NAME
11              
12             JMX::Jmx4Perl::Product::Resin - Handler for Resin
13              
14             =head1 DESCRIPTION
15              
16             This is the product handler support Resind 3 and 4 (L)
17              
18             =cut
19              
20             sub id {
21 4     4 1 28 return "resin";
22             }
23              
24             sub name {
25 0     0 1 0 return "Resin";
26             }
27              
28             sub order {
29 4     4 1 20 return 110;
30             }
31              
32             sub _try_version {
33 0     0     my $self = shift;
34 0           my $ret = $self->try_attribute("version","resin:type=Resin","Version");
35 0 0         if ($ret) {
36 0           $self->{version} =~ s|^.*?([\d.]+).*$|$1|;
37             }
38 0           return $ret;
39             }
40              
41             sub autodetect_pattern {
42 0     0 1   return ("version");
43             }
44              
45             sub jsr77 {
46 0     0 1   return 1;
47             }
48              
49             sub init_aliases {
50             return
51             {
52 0     0 1   attributes =>
53             {
54             #SERVER_ADDRESS => [ "jboss.system:type=ServerInfo", "HostAddress"],
55             #SERVER_HOSTNAME => [ "jonas:name=jonas,type=ServerProxy", "HostName"],
56             },
57             operations =>
58             {
59             #THREAD_DUMP => [ "jboss.system:type=ServerInfo", "listThreadDump"]
60             }
61             # Alias => [ "mbean", "attribute", "path" ]
62             };
63             }
64              
65              
66             =head1 LICENSE
67              
68             This file is part of jmx4perl.
69              
70             Jmx4perl is free software: you can redistribute it and/or modify
71             it under the terms of the GNU General Public License as published by
72             the Free Software Foundation, either version 2 of the License, or
73             (at your option) any later version.
74              
75             jmx4perl is distributed in the hope that it will be useful,
76             but WITHOUT ANY WARRANTY; without even the implied warranty of
77             MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
78             GNU General Public License for more details.
79              
80             You should have received a copy of the GNU General Public License
81             along with jmx4perl. If not, see .
82              
83             A commercial license is available as well. Please contact roland@cpan.org for
84             further details.
85              
86             =head1 AUTHOR
87              
88             roland@cpan.org
89              
90             =cut
91              
92             1;