Package com.sun.nfs

Class NfsSecurity

java.lang.Object
com.sun.nfs.NfsSecurity

public final class NfsSecurity extends Object
NfsSecurity is a static class. It reads in the com.sun.properties.nfssec properties file and provides the vehicle to retrieve properties values which are the (mechanism, service, qop) mappings for the NFS security pseudo flavor numbers.
Author:
Lin Ling
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static String
    Get the default security flavor number if it is specified in the nfssec.properties file, otherwise, simply return "1" for AUTH_SYS.
    static String
    getMech will get the security mechanism OID string from the second token in the value.
    static String
    getName will get the NFS security flavor name from the first token in the value.
    static String
    Get the preferred nfs security flavor number if it is specified in the nfssec.properties file, otherwise, return null.
    static int
    getQop will get the Quality of Protection number from the fourth token in the value.
    static int
    getService will get the security service type from the third token in the value.
    static boolean
    Does the key have a value defined in the nfssec.properties file? (i.e.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • NfsSecurity

      public NfsSecurity()
  • Method Details

    • hasValue

      public static boolean hasValue(String key)
      Does the key have a value defined in the nfssec.properties file? (i.e. is key=value defined in the properties list?)
      Parameters:
      key - the key to be searched
    • getDefault

      public static String getDefault()
      Get the default security flavor number if it is specified in the nfssec.properties file, otherwise, simply return "1" for AUTH_SYS.
    • getPrefer

      public static String getPrefer()
      Get the preferred nfs security flavor number if it is specified in the nfssec.properties file, otherwise, return null.
    • getName

      public static String getName(String key)
      getName will get the NFS security flavor name from the first token in the value. key=nfsSecName:mechOid:service:qop ^^^^^^^^^^
      Parameters:
      key - the key to be searched
    • getMech

      public static String getMech(String key)
      getMech will get the security mechanism OID string from the second token in the value. key=nfsSecName:mechOid:service:qop ^^^^^^^
      Parameters:
      key - the key to be searched
    • getService

      public static int getService(String key)
      getService will get the security service type from the third token in the value. key=nfsSecName:mechOid:service:qop ^^^^^^^
      Parameters:
      key - the key to be searched
    • getQop

      public static int getQop(String key)
      getQop will get the Quality of Protection number from the fourth token in the value. key=nfsSecName:mechOid:service:qop ^^^
      Parameters:
      key - the key to be searched