Jmx4Perl/Product/Unknown.pm

filter: Statementstmt 60.0% 18 / 30 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 58.3% 7 / 12 Podpod 100% 7 / 7 totaltotal 65.3% 32 / 49 CC 1 SCAR 3.5
CC
1
Cov
60%
name
2.0
info
2.0
autodetect
2.0
CRAP 1.4
« Jmx4Perl/Product/JBoss.pm ↑ Summary Jmx4Perl/Product/ActiveMQ.pm »
1 #!/usr/bin/perl
2 package JMX::Jmx4Perl::Product::Unknown;
3  
4 4 ▶use JMX::Jmx4Perl::Product::BaseHandler;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 4 ▶use JMX::Jmx4Perl;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 4 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 4 ▶use base "JMX::Jmx4Perl::Product::BaseHandler";
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 4 ▶use Carp qw(croak);
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 =head1 NAME
12  
13 JMX::Jmx4Perl::Product::Unknown - Fallback handler
14  
15 =head1 DESCRIPTION
16  
17 This fallback handler runs always as I<last> in the autodetection chain and
18 provides at least informations about the platform MXMBeans which are available
19 on any Java 5 platform.
20  
21 =cut
22  
23 4 ▶sub id {
Subroutine id: called CC=1 SCAR=0.0
Pod documented
24 4 return "unknown";
25 }
26  
27 0 ▶sub name {
Subroutine name: not called CC=1 SCAR=6.9
Pod documented
28 0 return "unknown";
29 }
30  
31 # Highest ordering number
32 4 ▶sub order {
Subroutine order: called CC=1 SCAR=0.0
Pod documented
33 4 return 1000;
34 }
35  
36 0 ▶sub info {
Subroutine info: not called CC=1 SCAR=6.9
Pod documented
37 0 my $self = shift;
38 0 my $verbose = shift;
39  
40 0 my $ret = $self->jvm_info($verbose);
41 0 $ret .= "-" x 80 . "\n";
42 0 $ret .= "The application server's brand could not be auto-detected.\n";
43 0 $ret .= "Known brands are: " . (join ", ",grep { $_ ne "unknown"} @JMX::Jmx4Perl::PRODUCT_HANDLER_ORDERING) . "\n\n";
44 0 $ret .=
45 "Please submit the output of 'jmx4perl list' and 'jmx4perl attributes' to\n" .
46 "roland\@cpan.de in order to provide a new product handler in the next release\n";
47 }
48  
49 0 ▶sub autodetect {
Subroutine autodetect: not called CC=1 SCAR=6.9
Pod documented
50 # Since we are the last one in the chain, we will be the one 'found'
51 0 return 1;
52 }
53  
54 0 ▶sub version {
Subroutine version: not called CC=1 SCAR=6.9
Pod documented
55 0 return "";
56 }
57  
58 0 ▶sub jsr77 {
Subroutine jsr77: not called CC=1 SCAR=6.9
Pod documented
59 0 return 0;
60 }
61  
62  
63 =head1 LICENSE
64  
65 This file is part of jmx4perl.
66  
67 Jmx4perl is free software: you can redistribute it and/or modify
68 it under the terms of the GNU General Public License as published by
69 the Free Software Foundation, either version 2 of the License, or
70 (at your option) any later version.
71  
72 jmx4perl is distributed in the hope that it will be useful,
73 but WITHOUT ANY WARRANTY; without even the implied warranty of
74 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
75 GNU General Public License for more details.
76  
77 You should have received a copy of the GNU General Public License
78 along with jmx4perl. If not, see <http://www.gnu.org/licenses/>.
79  
80 A commercial license is available as well. Please contact roland@cpan.org for
81 further details.
82  
83 =head1 AUTHOR
84  
85 roland@cpan.org
86  
87 =cut
88  
89 4 1;
« Jmx4Perl/Product/JBoss.pm ↑ Summary Jmx4Perl/Product/ActiveMQ.pm »