NAL

From Gcube Wiki
Revision as of 20:31, 20 March 2007 by Henri (Talk | contribs)

Jump to: navigation, search

Introduction

The Node Access Library (NAL) is a Java Library that provides different functionalities to access the local node information. It allows to obtain the DHN unique ID, the Running Instance unique ID, the list of service running in the node, the running instance profile of the caller, and the node free disk space. Moreover, the NAL, gives access to the VO Maps and allows services to set/get both the Specific Data section and the State section in their Running Instance profile.

Implentation Overview

Each WSRF service should instantiate a NAL object in order to have access to node information (see Usage Example for details).

  • Library functionalities description:
    1. List VO Maps
      • Return a list with the name of the DHN VOs
        signature
        public Vector getVOMapsList ( ) throws Exception
        parameters
        n.a.
        return
        The list of the DHN VOs
    2. get VO Map
      • Return a VO Map
        signature
        public String getVOMap (String voname) throws Exception
        parameters
        The VO name
        return
        The VO Map if exists, exception otherwise.
    3. Get the Running Instance ID
      • Returns the RI unique ID of a given service name and service class
        signature
        public String getRIID ( String serviceName, String serviceClass ) throws Exception
        parameters
        A valid local RI service name
        A valid local RI service class
        return
        The RI ID if valid {class, name} parameters were used, exception otherwise.
    4. Get the Running Instance ID
      • Returns the RI unique ID of a given RI profile
        signature
        public String getRIID ( String riProfile ) throws Exception
        parameters
        A RI profile
        return
        The RI ID if valid RI profile parameter was used, exception otherwise.
    5. Get the service ID
      • Returns the service ID of a given service name and service class
        signature
        public String getServiceID ( String serviceName, String serviceClass ) throws Exception
        parameters
        A valid local service name
        A valid local service class
        return
        The service ID if valid {class, name} parameters were used, exception otherwise.
      • signature
        parameters
        return
      • signature
        parameters
        return
      • signature
        parameters
        return
      • signature
        parameters
        return
      • signature
        parameters
        return
      • signature
        parameters
        return
      • signature
        parameters
        return
      • signature
        parameters
        return
      • signature
        parameters
        return



Dependencies

The NAL used following external libraries:

  • commons-io-1.2.jar
  • dvos.authentication-api.jar
  • jaxb-api.jar
  • jaxb-impl.jar
  • jaxb-xjc.jar
  • jaxb1-impl.jar
  • jsr173_api.jar

As well as the following DILIGENT jar files:

  • org_diligentproject_common_profile.jar
  • org_diligentproject_common_profilemanager.jar
  • org_diligentproject_keeperservice_hnm_stubs.jar


Usage Example

NAL Initialization

Default constructor:

NAL    nal     = new NAL ();

With a given base directory:

String baseDir = ContainerConfig.getBaseDirectory() + "/etc/org_diligentproject_keeperservice_hnm/HNMService";
NAL    nal     = new NAL (baseDir);

Calling the get VO Map list method

Vector voList = nal.getVOMapsList ();

Calling the set specific data method

boolean result = nal.setSpecificData("PackageRepository", "Keeper", "PR specific data", "diligent");