File Coverage

blib/lib/JMX/Jmx4Perl/Product/Geronimo.pm
Criterion Covered Total %
statement 14 22 63.6
branch n/a
condition 0 3 0.0
subroutine 6 10 60.0
pod 6 6 100.0
total 26 41 63.4


line stmt bran cond sub pod time code
1             #!/usr/bin/perl
2             package JMX::Jmx4Perl::Product::Geronimo;
3              
4 3     3   13 use JMX::Jmx4Perl::Product::BaseHandler;
  3         4  
  3         75  
5 3     3   13 use strict;
  3         6  
  3         64  
6 3     3   14 use base "JMX::Jmx4Perl::Product::BaseHandler";
  3         5  
  3         180  
7              
8 3     3   14 use Carp qw(croak);
  3         6  
  3         501  
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)
17              
18             =cut
19              
20             sub id {
21 3     3 1 20 return "geronimo";
22             }
23              
24             sub name {
25 0     0 1 0 return "Apache Geronimo";
26             }
27              
28             # Not that popular
29             sub order {
30 3     3 1 14 return 10;
31             }
32              
33             sub autodetect {
34 0     0 1   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   0       return $servers && @$servers;
40             }
41              
42             sub jsr77 {
43 0     0 1   return 1;
44             }
45              
46             sub init_aliases {
47             return
48             {
49 0     0 1   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 .
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             1;