JAFS API v2

org.openafs.jafs
Class ErrorTable

java.lang.Object
  |
  +--org.openafs.jafs.ErrorTable

public final class ErrorTable
extends Object

Static class for error code message management.

Simply translates all error codes returned by the AFS native library to literal string messages according to the defined locale.

Version:
2.0, 11/06/2000

Field Summary
static int BAD_ADDRESS
           
static int BAD_FILE
           
static int BAD_PASSWORD
           
static int BAD_USERNAME
           
static int BZACCESS
           
static int CELL_NOT_FOUND
           
static int CONNECTION_TIMED_OUT
           
static int DEVICE_BUSY
           
static int DIRECTORY_NOT_EMPTY
           
static int EXPIRED_PASSWORD
           
static int EXPIRED_SESSION
           
static int FILE_BUSY
           
static int FILE_EXISTS
           
static int FILE_OVERFLOW
           
static int FORCED_ABORT
           
static int GENERAL_FAILURE
           
static int ID_LOCKED
           
static int INVALID_ARG
           
static int INVALID_SESSION
           
static int IO_ERROR
           
static int IS_DIRECTORY
           
static int KANOAUTH
           
static int NAME_TOO_LONG
           
static int NO_DEVICE
           
static int NO_DEVICE_ADDRESS
           
static int NOT_DIRECTORY
           
static int NOT_FOUND
           
static int NOT_PERMITTED
           
static int NULL
           
static int OPERATION_ABORTED
           
static int OUT_OF_MEMORY
           
static int PERMISSION_DENIED
           
static int PRPERM
           
static int QUOTA_EXCEEDED
           
static int RXKADNOAUTH
           
static int SKEWED_CLOCK
           
static int SPECIAL_CASE
           
static int TRY_AGAIN
           
static int UNKNOWN
           
static int UNOACCESS
           
static int USER_DOES_NOT_EXIST
           
static int USERNAME_EXISTS
           
 
Constructor Summary
ErrorTable()
           
 
Method Summary
static String getMessage(int errno)
          Returns a String message representing the error code (number) provided.
static String getMessage(int errno, Locale locale)
          Returns a String message, respective to the provided locale, representing the error code (number) provided.
static boolean isPermissionDenied(int errno)
          Tests to identify if the return code is a "Permission Denied" error.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UNKNOWN

public static final int UNKNOWN
See Also:
Constant Field Values

SPECIAL_CASE

public static final int SPECIAL_CASE
See Also:
Constant Field Values

GENERAL_FAILURE

public static final int GENERAL_FAILURE
See Also:
Constant Field Values

NULL

public static final int NULL
See Also:
Constant Field Values

INVALID_SESSION

public static final int INVALID_SESSION
See Also:
Constant Field Values

EXPIRED_SESSION

public static final int EXPIRED_SESSION
See Also:
Constant Field Values

OPERATION_ABORTED

public static final int OPERATION_ABORTED
See Also:
Constant Field Values

FORCED_ABORT

public static final int FORCED_ABORT
See Also:
Constant Field Values

NOT_PERMITTED

public static final int NOT_PERMITTED
See Also:
Constant Field Values

NOT_FOUND

public static final int NOT_FOUND
See Also:
Constant Field Values

IO_ERROR

public static final int IO_ERROR
See Also:
Constant Field Values

NO_DEVICE_ADDRESS

public static final int NO_DEVICE_ADDRESS
See Also:
Constant Field Values

BAD_FILE

public static final int BAD_FILE
See Also:
Constant Field Values

TRY_AGAIN

public static final int TRY_AGAIN
See Also:
Constant Field Values

OUT_OF_MEMORY

public static final int OUT_OF_MEMORY
See Also:
Constant Field Values

PERMISSION_DENIED

public static final int PERMISSION_DENIED
See Also:
Constant Field Values

BAD_ADDRESS

public static final int BAD_ADDRESS
See Also:
Constant Field Values

DEVICE_BUSY

public static final int DEVICE_BUSY
See Also:
Constant Field Values

FILE_EXISTS

public static final int FILE_EXISTS
See Also:
Constant Field Values

NO_DEVICE

public static final int NO_DEVICE
See Also:
Constant Field Values

NOT_DIRECTORY

public static final int NOT_DIRECTORY
See Also:
Constant Field Values

IS_DIRECTORY

public static final int IS_DIRECTORY
See Also:
Constant Field Values

INVALID_ARG

public static final int INVALID_ARG
See Also:
Constant Field Values

FILE_OVERFLOW

public static final int FILE_OVERFLOW
See Also:
Constant Field Values

FILE_BUSY

public static final int FILE_BUSY
See Also:
Constant Field Values

NAME_TOO_LONG

public static final int NAME_TOO_LONG
See Also:
Constant Field Values

DIRECTORY_NOT_EMPTY

public static final int DIRECTORY_NOT_EMPTY
See Also:
Constant Field Values

CONNECTION_TIMED_OUT

public static final int CONNECTION_TIMED_OUT
See Also:
Constant Field Values

QUOTA_EXCEEDED

public static final int QUOTA_EXCEEDED
See Also:
Constant Field Values

BAD_USERNAME

public static final int BAD_USERNAME
See Also:
Constant Field Values

BAD_PASSWORD

public static final int BAD_PASSWORD
See Also:
Constant Field Values

EXPIRED_PASSWORD

public static final int EXPIRED_PASSWORD
See Also:
Constant Field Values

SKEWED_CLOCK

public static final int SKEWED_CLOCK
See Also:
Constant Field Values

ID_LOCKED

public static final int ID_LOCKED
See Also:
Constant Field Values

CELL_NOT_FOUND

public static final int CELL_NOT_FOUND
See Also:
Constant Field Values

USERNAME_EXISTS

public static final int USERNAME_EXISTS
See Also:
Constant Field Values

USER_DOES_NOT_EXIST

public static final int USER_DOES_NOT_EXIST
See Also:
Constant Field Values

PRPERM

public static final int PRPERM
See Also:
Constant Field Values

UNOACCESS

public static final int UNOACCESS
See Also:
Constant Field Values

BZACCESS

public static final int BZACCESS
See Also:
Constant Field Values

KANOAUTH

public static final int KANOAUTH
See Also:
Constant Field Values

RXKADNOAUTH

public static final int RXKADNOAUTH
See Also:
Constant Field Values
Constructor Detail

ErrorTable

public ErrorTable()
Method Detail

isPermissionDenied

public static boolean isPermissionDenied(int errno)
Tests to identify if the return code is a "Permission Denied" error.

This method will qualify errno against:

  • ErrorTable.PERMISSION_DENIED
  • ErrorTable.PRPERM
  • ErrorTable.UNOACCESS
  • ErrorTable.BZACCESS
  • ErrorTable.KANOAUTH
  • ErrorTable.RXKADNOAUTH

    Parameters:
    errno - Error Code/Number
    Returns:
    boolean If errno is a "Permission Denied" error.

  • getMessage

    public static String getMessage(int errno)
    Returns a String message representing the error code (number) provided.

    If the error code provided is out of range of the library of defined error codes, this method will return Error number [###] unknown . If an exception is thrown, this method will return either: Unknown error, Special case error, or Invalid error code: ###.

    Parameters:
    errno - Error Code/Number
    Returns:
    String Interpreted error message derived from errno.

    getMessage

    public static String getMessage(int errno,
                                    Locale locale)
    Returns a String message, respective to the provided locale, representing the error code (number) provided.

    If the error code provided is out of range of the library of defined error codes, this method will return Error number [###] unknown . If an exception is thrown, this method will return either: Unknown error, Special case error, or Invalid error code: ###.

    Parameters:
    errno - Error Code/Number
    locale - Locale of to be used for translating the message.
    Returns:
    String Interpreted error message derived from errno.

    JAFS API v2