Aaron Brown > perfSONAR_PS-Services-PingER-0.09 > perfSONAR_PS::Datatypes::PingER

Download:
perfSONAR_PS-Services-PingER-0.09.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Source  

NAME ^

 perfSONAR_PS::Datatypes::PingER  -  this is a pinger message  handler object

DESCRIPTION ^

   it inherits everything from perfSONAR_PS::Datatypes::Message and only implements  request handlers with pinger specifics 

SYNOPSIS ^

             use perfSONAR_PS::Datatypes::PingER ;
           
             
             my ($DOM) = $requestMessage->getElementsByTag('message');
            
             my $message = new perfSONAR_PS::Datatypes::PingER($DOM);
             $message = new perfSONAR_PS::Datatypes::PingER({id => '2345', 
                                                             type = 'SetupdataResponse',
                                                             metadata => {'id1' =>   <obj>},
                                                             data=> {'id1' => <obj>}}); 
         
            #######   add data element, namespaces will be added from this object to Message object namespace declaration
             $message->addPartById('id1', 'data', new perfSONAR_PS::Datatypes::PingER::data({id=> 'id1', metadataIdRef => 'metaid1' }));
        
            ########add metadata element, namespaces will be added from this object to Message object namespace declaration
             $message->addPartById('id1', 'metadata',  new perfSONAR_PS::Datatypes::PingER::metadata({id=> 'id1' });
             
             my $dom = $message->getDOM(); # get as DOM 
             print $message->asString();  # print the whole message

METHODS ^

handle

   dispatch method. accepts type of request,response object and MA config hashref as parameters, returns fully built response object,
   sets query size limit  

MetadataKeyRequest

      method for MetadataKey request,  works per event ( single pre-merged md  and data pair)
      returns filled response message object 

  ###############################  From Jason's SNMP MA code ################################### 
  # MA MetadataKeyRequest Steps
  # ---------------------
  # Is there a key?
  #   Y: do queries against key 
  #      return key as md AND d
  #   N: Is there a chain?
  #     Y: Is there a key
  #       Y: do queries against key, add in select stuff to key, return key as md AND d
  #       N: do md/d queries against md return results with altered key
  #     N: do md/d queries against md return results
  #--------------------------

SetupDataRequest

   SetupData request,    works per event ( single pre-merged md  and data pair)
      returns filled response message object 
      returns filled response  
  ###############################  From Jason's SNMP MA code ################################### 
  # MA SetupdataRequest Steps
  # ---------------------
  # Is there a key?
  #   Y: key in db?
  #     Y: Original MD in db?
  #       Y: add it, extract data
  #       N: use sent md, extract data
  #     N: error out
  #   N: Is it a select?
  #     Y: Is there a matching MD?
  #       Y: Is there a key in the matching md?
  #         Y: Original MD in db?
  #           Y: add it, extract data
  #           N: use sent md, extract data
  #         N: extract md (for correct md), extract data
  #       N: Error out
  #     N: extract md, extract data
  #----------------------------------
  #     Updated from Jason e-mail, 11/27/07
  #
  #   Is there a key?
  #     Y: key in db?
  #         Y: chain metadata      
  #            extract data
  #         N: error out
  #     N: Is it a select?
  #         Y: Is there a matching MD?
  #             Y: Is there a key in the matching md?
  #                  Y: key in db?
  #                      Y: chain metadata 
  #                         extract data
  #                      N: error out
  #                 N:  chain metadata
  #                     extract data     
  #             N: Error out
  #        N: chain metadata
  #           extract data 
  #
  # 

AUTHORS ^

   Maxim Grigoriev (FNAL)   2007-2008
syntax highlighting: