Digital Authentication Framework 4.2.0.30
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes

com.good.daf.DAError Class Reference

A Java reflection of the native DAError type. More...

List of all members.

Public Types

enum  Code {
  Invalid, NoMemory, NotProvisioned, DeviceNotFound,
  NoMoreSessions, DeviceDisconnected, DeviceProtocolError, BadAuthToken,
  KeyNotFound, AttribNotFound, MechNotFound, VerifyFailed,
  NotImplemented, BadParameters, OsError, UnsupportedHash
}
 

Enumeration matching the native DAError type.

More...

Public Member Functions

 DAError (Code c)
 Construct a new DAError with specified error Code.
 DAError (Code c, Throwable cause)
 Construct a new DAError with specified error Code, and parent cause exception.
 DAError (int c)
 Constructor a new DAError with specified native error code.
int getCode ()
 Get native error code.

Static Public Member Functions

static Code lookupCode (int code)
 Looks up a Code for the given native error code.

Static Public Attributes

static DAError NotProvisioned = new DAError(Code.NotProvisioned)
static DAError DeviceNotFound = new DAError(Code.DeviceNotFound)
static DAError NoMoreSessions = new DAError(Code.NoMoreSessions)
static DAError DeviceDisconnected = new DAError(Code.DeviceDisconnected)
static DAError DeviceProtocolError = new DAError(Code.DeviceProtocolError)
static DAError BadAuthToken = new DAError(Code.BadAuthToken)
static DAError KeyNotFound = new DAError(Code.KeyNotFound)
static DAError AttribNotFound = new DAError(Code.AttribNotFound)
static DAError MechNotFound = new DAError(Code.MechNotFound)
static DAError VerifyFailed = new DAError(Code.VerifyFailed)
static DAError NotImplemented = new DAError(Code.NotImplemented)
static DAError BadParameters = new DAError(Code.BadParameters)
static DAError OsError = new DAError(Code.OsError)
static DAError UnsupportedHash = new DAError(Code.UnsupportedHash)

Detailed Description

A Java reflection of the native DAError type.

This type is both an exception (so it can be thrown and caught within Java), and an encapsulation of the native DAError enumeratoion (via the Code enum type).


Member Enumeration Documentation

Enumeration matching the native DAError type.

This enum order must be kept in sync with native DAError.

Enumerator:
Invalid 

Success in native code, but an exception never describes success.

NoMemory 

General memory allocation failure.

In general, throw OutOfMemoryError instead.

NotProvisioned 

Driver has not been set up with a device.

DeviceNotFound 

Cannot find the device.

NoMoreSessions 

The maximum allowed number of concurrent sessions are already connected.

DeviceDisconnected 

Link to device lost unexpectedly.

DeviceProtocolError 

Error from protocol stack talking to device.

BadAuthToken 

authToken provided to CreateSession was bad

KeyNotFound 

Requested key does not exist.

AttribNotFound 

Requested attribute not available.

MechNotFound 

Requested mechanism is not supported.

VerifyFailed 

Verification of signature failed.

NotImplemented 

Method not implemented.

BadParameters 

Missing or invalid parameters to method.

OsError 

Operating system call failed.

UnsupportedHash 

Requested hash function cannot be used here.


Constructor & Destructor Documentation

com.good.daf.DAError.DAError ( Code  c)

Construct a new DAError with specified error Code.

Parameters:
cerror code
com.good.daf.DAError.DAError ( Code  c,
Throwable  cause 
)

Construct a new DAError with specified error Code, and parent cause exception.

Parameters:
cerror code
causeparent cause exception
com.good.daf.DAError.DAError ( int  c)

Constructor a new DAError with specified native error code.

Parameters:
cnative error code

Member Function Documentation

int com.good.daf.DAError.getCode ( )

Get native error code.

Returns:
native error code
static Code com.good.daf.DAError.lookupCode ( int  code) [static]

Looks up a Code for the given native error code.

Returns null if there is no known Code for that native error code.

Returns:
a Code or null

The documentation for this class was generated from the following file: