NAME

perfSONAR_PS::Services::Base - A module that provides basic methods for Servicess.

DESCRIPTION

This module aims to offer simple methods for dealing with requests for information, and the related tasks of interacting with backend storage.

SYNOPSIS

use perfSONAR_PS::Services::Base;

my %conf = ();
$conf{"METADATA_DB_TYPE"} = "xmldb";
$conf{"METADATA_DB_NAME"} = "/home/jason/perfSONAR-PS/MP/SNMP/xmldb";
$conf{"METADATA_DB_FILE"} = "snmpstore.dbxml";

my %ns = (
  nmwg => "http://ggf.org/ns/nmwg/base/2.0/",
  netutil => "http://ggf.org/ns/nmwg/characteristic/utilization/2.0/",
  nmwgt => "http://ggf.org/ns/nmwg/topology/2.0/",
  snmp => "http://ggf.org/ns/nmwg/tools/snmp/2.0/"    
);

my $self = perfSONAR_PS::Services::Base->new(\%conf, \%ns);

# or
# $self = perfSONAR_PS::Services::Base->new;
# $self->setConf(\%conf);
# $self->setNamespaces(\%ns);              

$self->init;

my $response = $self->respond;
if(!$response) {
  $self->error($self, "Whoops...", __LINE__)
}

DETAILS

This API is a work in progress, and still does not reflect the general access needed in an Services. Additional logic is needed to address issues such as different backend storage facilities.

API

The offered API is simple, but offers the key functions we need in a measurement archive.

new(\%conf, \%ns)

The accepted arguments may also be ommited in favor of the 'set' functions.

setConf(\%conf)

(Re-)Sets the value for the 'conf' hash.

init()

Initialize the underlying transportation medium. This function depends on certain conf file values.

respond()

Send message stored in $self->{RESPONSE}.

keyRequest(($self, $metadatadb, $m, $localContent, $messageId, $messageIdRef)

DEPRICATED

SEE ALSO

Exporter, Log::Log4perl, perfSONAR_PS::Transport, perfSONAR_PS::Messages, perfSONAR_PS::Services::General

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: Base.pm 524 2007-09-05 17:35:50Z aaron $

AUTHOR

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-2007, Internet2 and the University of Delaware

All rights reserved.