The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

perfSONAR_PS::Client::Echo - A module that provides methods for interacting with perfSONAR Echo services.

DESCRIPTION

This module allows one to test whether or not a perfSONAR service is running by testing by pinging it using the standardized pS ping request.

The module is to be treated as an object, where each instance of the object represents a connection to an endpoint. Each method may then be invoked on the object for the specific endpoint.

SYNOPSIS

        use perfSONAR_PS::Client::Echo;

        my $echo_client = new perfSONAR_PS::Client::Echo("http://localhost:4801/axis/services/status");
        if (not defined $echo_client) {
                print "Problem creating echo client for service\n";
                exit(-1);
        }

        my ($status, $res) = $echo_client->ping;
        if ($status != 0) {
                print "Problem pinging service: $res\n";
                exit(-1);
        }

DETAILS

API

The API os perfSONAR_PS::Client::Echo is rather simple and greatly resembles the messages types received by the server.

new($package, $uri_string, $eventType)

The new function takes a URI connection string as its first argument. This specifies which service to interact with. The function can take an optional eventType argument which can be used if a service only supports a specific echo request event type.

ping($self)

The ping function is used to test if the service is up. It returns an array containing two values. The first value is a number which specifies whether the ping succeeded. If it's 0, that means the ping succeeded and the second value is undefined. If it is -1, that means the ping failed and the second value contains an error message.

setURIString($self, $uri_string)

The setURIString function changes the MA that the instance uses.

setEventType($self, $eventType)

The setEventType function changes the eventType that the instance uses.

SEE ALSO

perfSONAR_PS::Common, perfSONAR_PS::Transport, perfSONAR_PS::Messages, perfSONAR_PS::XML::Document_string, Log::Log4perl

To join the 'perfSONAR-PS' mailing list, please visit:

  https://mail.internet2.edu/wws/info/i2-perfsonar

The perfSONAR-PS subversion repository is located at:

  https://svn.internet2.edu/svn/perfSONAR-PS 
  

Questions and comments can be directed to the author, or the mailing list.

VERSION

$Id$

AUTHOR

Aaron Brown, aaron@internet2.edu Jason Zurawski, zurawski@internet2.edu

LICENSE

You should have received a copy of the Internet2 Intellectual Property Framework along with this software. If not, see <http://www.internet2.edu/membership/ip.html>

COPYRIGHT

Copyright (c) 2004-2008, Internet2 and the University of Delaware

All rights reserved.