
perfSONAR_PS::Messages - A module that provides common methods for performing actions on message constructs.

This module is a catch all for message related methods in the perfSONAR-PS framework. As such there is no 'common thread' that each method shares. This module IS NOT an object, and the methods can be invoked directly (and sparingly).

use perfSONAR_PS::Messages;
# NOTE: Individual methods can be extraced:
#
# use perfSONAR_PS::Messages qw( getResultMessage getResultCodeMessage )
my $id = genuid();
my $idRef = genuid();
my $content = "<nmwg:metadata />";
my $msg = getResultMessage($id, $idRef, "response", $content);
$msg = getResultCodeMessage($id, $idRef, "response", "error.ma.transport" , "something...");
$msg = getResultCodeMetadata($id, $idRef, "error.ma.transport);
$msg = getResultCodeData($id, $idRef, "something...");
$msg = createMetadata($id, $idRef, $content);
$msg = createData($id, $idRef, $content);

The API for this module aims to be simple; note that this is not an object and each method does not have the 'self knowledge' of variables that may travel between functions.

The API of perfSONAR_PS::Messages offers simple calls to create message constructs.
Given a messageId, messageIdRef, a type, and some amount of content a message element is returned. If $namespaces is specified, it adds the specified namespaces to the resulting nmwg:message.
Given a messageId, messageIdRef, metadataIdRef, messageType, event code, and some sort of description, generate a result code message. This function uses the getResultCodeMetadata and getResultCodeData. If the $escape_description value is equal to 1, the description is XML escaped.
Given an id, metadataIdRef, and some event code retuns the result metadata.
Given an id, metadataIdRef, and some description return the result data. If the $escape_description value is equal to 1, the description is XML escaped.
Given an id, metadataIdRef and some content, create a metadata.
Given an id, metadataIdRef and some content, create a data.

Exporter, Log::Log4perl, perfSONAR_PS::Common
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.

$Id$

Jason Zurawski, zurawski@internet2.edu

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 (c) 2004-2007, Internet2 and the University of Delaware
All rights reserved.