Jmx4Perl/Product/Geronimo.pm

filter: Statementstmt 65.2% 15 / 23 Branchbran n/a Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 60.0% 6 / 10 Podpod 100% 6 / 6 totaltotal 61.3% 27 / 44 CC 2 SCAR 7.8
CC
2
Cov
58%
autodetect
6.0
name
2.0
jsr77
2.0
CRAP 2.2
« Jmx4Perl/Alias.pm ↑ Summary Jmx4Perl/Product/Tomcat.pm »
1 #!/usr/bin/perl
2 package JMX::Jmx4Perl::Product::Geronimo;
3  
4 4 ▶use JMX::Jmx4Perl::Product::BaseHandler;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 4 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 4 ▶use base "JMX::Jmx4Perl::Product::BaseHandler";
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 4 ▶use Carp qw(croak);
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 =head1 NAME
11  
12 JMX::Jmx4Perl::Product::Geronimo - Handler for Geronimo
13  
14 =head1 DESCRIPTION
15  
16 This is the product handler supporting Geronimo 2 (L<http://geronimo.apache.org/>)
17  
18 =cut
19  
20 4 ▶sub id {
Subroutine id: called CC=1 SCAR=0.0
Pod documented
21 4 return "geronimo";
22 }
23  
24 0 ▶sub name {
Subroutine name: not called CC=1 SCAR=6.9
Pod documented
25 0 return "Apache Geronimo";
26 }
27  
28 # Not that popular
29 4 ▶sub order {
Subroutine order: called CC=1 SCAR=0.0
Pod documented
30 4 return 10;
31 }
32  
33 0 ▶sub autodetect {
Subroutine autodetect: not called CC=2 SCAR=17.9
Pod documented
34 0 my $self = shift;
35 0 my $info = shift;
36 0 my $jmx = $self->{jmx4perl};
37  
38 0 my $servers = $jmx->search("geronimo:j2eeType=J2EEServer,*");
39 0 ▶ return $servers && @$servers;
Condition0%0/3
$servers && @$servers
!ll&&!rl&&r
000
MC/DC0%0/2
$servers && @$servers
$servers @$servers
Truth table0%0/3
A && B
A= $serversB= @$servers
ABresult
0X0
100
111
40 }
41  
42 0 ▶sub jsr77 {
Subroutine jsr77: not called CC=1 SCAR=6.9
Pod documented
43 0 return 1;
44 }
45  
46 0 ▶sub init_aliases {
Subroutine init_aliases: not called CC=1 SCAR=6.9
Pod documented
47 return
48 {
49 0 attributes =>
50 {
51 #SERVER_ADDRESS => [ "jboss.system:type=ServerInfo", "HostAddress"],
52 #SERVER_HOSTNAME => [ "Catalina:type=Engine", "defaultHost"],
53 },
54 operations =>
55 {
56 #THREAD_DUMP => [ "jboss.system:type=ServerInfo", "listThreadDump"]
57 }
58 # Alias => [ "mbean", "attribute", "path" ]
59 };
60 }
61  
62  
63  
64 =head1 LICENSE
65  
66 This file is part of jmx4perl.
67  
68 Jmx4perl is free software: you can redistribute it and/or modify
69 it under the terms of the GNU General Public License as published by
70 the Free Software Foundation, either version 2 of the License, or
71 (at your option) any later version.
72  
73 jmx4perl is distributed in the hope that it will be useful,
74 but WITHOUT ANY WARRANTY; without even the implied warranty of
75 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
76 GNU General Public License for more details.
77  
78 You should have received a copy of the GNU General Public License
79 along with jmx4perl. If not, see <http://www.gnu.org/licenses/>.
80  
81 A commercial license is available as well. Please contact roland@cpan.org for
82 further details.
83  
84 =head1 AUTHOR
85  
86 roland@cpan.org
87  
88 =cut
89  
90 4 1;
« Jmx4Perl/Alias.pm ↑ Summary Jmx4Perl/Product/Tomcat.pm »