blib/lib/JMX/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 SCAR 0.6
CC
1
Cov
60%
name
2.0
info
2.0
autodetect
2.0
CRAP 1.1
« blib/lib/JMX/Jmx4Perl/Agent/Jolokia/Verifier/SHA1Verifier.pm ↑ Summary blib/lib/JMX/Jmx4Perl/Product/Jonas.pm »
1 #!/usr/bin/perl
2 package JMX::Jmx4Perl::Product::Unknown;
3  
4 2 ▶use JMX::Jmx4Perl::Product::BaseHandler;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 2 ▶use JMX::Jmx4Perl;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 2 ▶use base "JMX::Jmx4Perl::Product::BaseHandler";
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 2 ▶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 sub id {
24 2 ▶ return "unknown";
Subroutine id: called CC=1 SCAR=0.0
Pod documented
25 }
26  
27 sub name {
28 0 ▶ return "unknown";
Subroutine name: not called CC=1 SCAR=6.9
Pod documented
29 }
30  
31 # Highest ordering number
32 sub order {
33 2 ▶ return 1000;
Subroutine order: called CC=1 SCAR=0.0
Pod documented
34 }
35  
36 sub info {
37 0 ▶ my $self = shift;
Subroutine info: not called CC=1 SCAR=6.9
Pod documented
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 sub autodetect {
50 # Since we are the last one in the chain, we will be the one 'found'
51 0 ▶ return 1;
Subroutine autodetect: not called CC=1 SCAR=6.9
Pod documented
52 }
53  
54 sub version {
55 0 ▶ return "";
Subroutine version: not called CC=1 SCAR=6.9
Pod documented
56 }
57  
58 sub jsr77 {
59 0 ▶ return 0;
Subroutine jsr77: not called CC=1 SCAR=6.9
Pod documented
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 2 1;
« blib/lib/JMX/Jmx4Perl/Agent/Jolokia/Verifier/SHA1Verifier.pm ↑ Summary blib/lib/JMX/Jmx4Perl/Product/Jonas.pm »