Digital Authentication Framework  6.0.1.37
Public Member Functions | List of all members
com.good.daf.DASession Interface Reference

This type describes a session with a device. More...

Inheritance diagram for com.good.daf.DASession:
com.good.daf.basic.BasicSession

Public Member Functions

DAMetaData getInfo ()
 Get information about this instance. More...
 
boolean isConnected ()
 
int getKeyCount ()
 
DAKey getKey (int index)
 Returns the nth key available in this session. More...
 
DAKey getKey (String serial)
 Returns the key with the given serial number (DAAttrib.SERIAL). More...
 

Detailed Description

This type describes a session with a device.

What a 'session' means is specific to the type of device. For simple devices a session might not be a useful concept, but for devices supporting on-line, authenticated, stateful communications a session would represent this communications session.

A DASession offers the important ability to enumerate and obtain the available keys available from the connected device, represented by DAKey instances.

Member Function Documentation

DAMetaData com.good.daf.DASession.getInfo ( )

Get information about this instance.

This method will be called once shortly after construction and the result wrapped by the native translation layer.

This method is not allowed to fail except fatally (OutOfMemoryError, etc.)

Returns
the metadata object for this instance. Must not be null.

Implemented in com.good.daf.basic.BasicSession.

DAKey com.good.daf.DASession.getKey ( int  index)

Returns the nth key available in this session.

For a given session, keys should be placed in a consistent order and made available through this method. The order need not be consistent between sessions.

You may return null on error, or if index is smaller than zero or greater than or equal to the number of keys.

Parameters
indexan index >= 0 and < getKeyCount()
Returns
a DAKey implementor, or null on error.

Implemented in com.good.daf.basic.BasicSession.

DAKey com.good.daf.DASession.getKey ( String  serial)

Returns the key with the given serial number (DAAttrib.SERIAL).

You may return null on error, for instance if the key is not found.

Parameters
serialserial number to search keys for.
Returns
a DAKey implementor, or null on error.

Implemented in com.good.daf.basic.BasicSession.

int com.good.daf.DASession.getKeyCount ( )
Returns
the number of keys available in this session.

Implemented in com.good.daf.basic.BasicSession.

boolean com.good.daf.DASession.isConnected ( )
Returns
true if the device is still connected.

Implemented in com.good.daf.basic.BasicSession.


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