Net::Tomcat::Connector - Utility class for representing Tomcat Connector objects
Net::Tomcat::Connector is a utility class for representing Tomcat Connector objects.
use Net::Tomcat; # Create a new Net::Tomcat object my $tc = Net::Tomcat->new( username => 'admin', password => 'password', hostname => 'web-server-01.company.com' ) or die "Unable to create new Net::Tomcat object: $!\n"; # Print the Tomcat server version and JVM version information print "Tomcat version: " . $tc->server->version . "\n" . "JVM version: " . $tc->server->jvm_version . "\n"; # Get all connectors as an array of Net::Tomcat::Connector objects my @connectors = $tc->connectors; # Print the connector names, and request and error counts foreach my $connector ( @connectors ) { print "Name: " . $connector->name . "\n" . "Request Count: ".$connector->stats->request_count . "\n" . "Error Count: ".$connector->stats->error_count . "\n\n" } # Directly access a connector by name print "http-8080 error count: " . $tc->connector('http-8080')->stats->error_count . "\n";
Constructor - creates a new Net::Tomcat::Connector. Note that you should not normally need to call the constructor method directly as a Net::Tomcat::Connector object will be created for you on invoking methods in parent classes.
Returns the connector name. Note that Net::Tomcat::Connector objects also use this method to implement stringification as an overloaded method.
# Print the connector name print "My connector name: " . $connector->name . "\n"; # Or print "My connector name: $connector\n";
Returns a Net::Tomcat::Connector::Statistics object containing statistics for the Tomcat connector.
Returns a Net::Tomcat::Connector::Scoreboard object containing the server scoreboard information for the connector.
Luke Poskitt, <ltp at cpan.org>
<ltp at cpan.org>
Please report any bugs or feature requests to bug-net-tomcat-connector at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Net-Tomcat-Connector. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-net-tomcat-connector at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc Net::Tomcat::Connector
You can also look for information at:
RT: CPAN's request tracker (report bugs here)
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Net-Tomcat-Connector
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/Net-Tomcat
CPAN Ratings
http://cpanratings.perl.org/d/Net-Tomcat-Connector
Search CPAN
http://search.cpan.org/dist/Net-Tomcat-Connector/
Copyright 2015 Luke Poskitt.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.
To install Net::Tomcat, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::Tomcat
CPAN shell
perl -MCPAN -e shell install Net::Tomcat
For more information on module installation, please visit the detailed CPAN module installation guide.