NAME
Net::Tomcat::Connector - Utility class for representing Tomcat Connector objects
SYNOPSIS
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";
METHODS
new
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.
name
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";
stats
Returns a Net::Tomcat::Connector::Statistics object containing statistics for the Tomcat connector.
scoreboard
Returns a Net::Tomcat::Connector::Scoreboard object containing the server scoreboard information for the connector.
AUTHOR
Luke Poskitt, <ltp at cpan.org>
BUGS
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.
SUPPORT
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
CPAN Ratings
Search CPAN
ACKNOWLEDGEMENTS
LICENSE AND COPYRIGHT
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.