com.ecebs.rtd.enabler
Interface IITSOFramework

All Known Implementing Classes:
ITSOFramework

public interface IITSOFramework

Provides type-independent access to a presented CM and it's contents.

Author:
kyleb

Field Summary
static int[] READ_ALL
          For use with the searchProducts(int[], int[], int[]) method as a wildcard.
 
Method Summary
 CardInformation detectCard(boolean isWhiteList, String... readers)
          The DETECT CARD function will return the ITSO Shell Environment Data Group and ITSO Directory Data Group, read and parsed, from a CM if one is present.
 void detectCard(IDetectCardCallback callback, boolean isWhiteList, String... readers)
          Registers the callback to be notified when a CM is presented.
 List<Product> getProducts(DirEntry... entries)
          The GET PRODUCT function will read and parse a single product from the CM.
 void getProducts(IITSOFrameworkCallback cb, DirEntry... entries)
          The GET PRODUCT function will read and parse a single product from the CM.
 void searchProducts(IITSOFrameworkCallback cb, int[] oids, int[] typs, int[] ptyps)
          The SEARCH PRODUCTS function will search for, read and parse any products on the CM that match the specified search parameters.
 List<Product> searchProducts(int[] oids, int[] typs, int[] ptyps)
          The SEARCH PRODUCTS function will search for, read and parse any products on the CM that match the specified search parameters.
 

Field Detail

READ_ALL

static final int[] READ_ALL
For use with the searchProducts(int[], int[], int[]) method as a wildcard.

See Also:
searchProducts(int[], int[], int[])
Method Detail

detectCard

CardInformation detectCard(boolean isWhiteList,
                           String... readers)
                           throws RTDEException
The DETECT CARD function will return the ITSO Shell Environment Data Group and ITSO Directory Data Group, read and parsed, from a CM if one is present.

to detect any presented card, call this method with the arguments detectCard(false).

Parameters:
isWhiteList - If true, the provided list of readers are those that are of interest. Otherwise, it is a list of those that should be ignored
readers - A platform-specific list of readers
Returns:
If a CM is present, the method will read, parse and return details about the CM. Otherwise, it will return null.
Throws:
RTDEException - Thrown if there was an issue while connecting with the card

detectCard

void detectCard(IDetectCardCallback callback,
                boolean isWhiteList,
                String... readers)
Registers the callback to be notified when a CM is presented. Upon detection of the CM, the ITSO Shell Environment Data Group and ITSO Directory Data Group are read, parsed and passed back using the provided callback instance.

to detect any presented card, call this method with the arguments detectCard(callback,false).

Parameters:
callback - Used to notify the caller when a card is detected, or if an error occurred while reading from a card
readers - A platform-specific list of readers
isWhiteList - If true, the provided list of readers are those that are of interest. Otherwise, it is a list of those that should be ignored

getProducts

List<Product> getProducts(DirEntry... entries)
                          throws RTDEException
The GET PRODUCT function will read and parse a single product from the CM.

A card must have been detected before calling this method

Parameters:
entries - The directory entry for the product to be read
Returns:
The IPE read from the CM
Throws:
RTDEException - Thrown if there was a problem communicating with the card
RepresentException - Thrown if a card was presented, but removed before the operation could be completed

getProducts

void getProducts(IITSOFrameworkCallback cb,
                 DirEntry... entries)
The GET PRODUCT function will read and parse a single product from the CM.

A card must have been detected before calling this method

Parameters:
cb - Used to notify the caller when the product has been read, or if an error occurred
entries - Directory entries for the products to be read

searchProducts

List<Product> searchProducts(int[] oids,
                             int[] typs,
                             int[] ptyps)
                             throws RTDEException
The SEARCH PRODUCTS function will search for, read and parse any products on the CM that match the specified search parameters. Wildcards are supported to ignore each particular search parameter.

A card must have been detected before calling this method

Parameters:
oids - The OIDs of interest. Only products with one of the specified OIDs will be read (unless READ_ALL is passed in)
typs - The TYPs of interest. Only products with one of the specified TYPs will be read (unless READ_ALL is passed in)
ptyps - The PTYPs of interest. Only products with one of the specified PTYPs will be read (unless READ_ALL is passed in)
Returns:
A list of all the IPEs read from the smartcard that matched the search parameters
Throws:
RTDEException - Thrown if there was a problem communicating with the card
RepresentException - Thrown if a card was presented, but removed before the operation could be completed

searchProducts

void searchProducts(IITSOFrameworkCallback cb,
                    int[] oids,
                    int[] typs,
                    int[] ptyps)
The SEARCH PRODUCTS function will search for, read and parse any products on the CM that match the specified search parameters. Wildcards are supported to ignore each particular search parameter.

A card must have been detected before calling this method

Parameters:
cb - Used to notify the caller when any matching products have been read, or if an error occurred
oids - The OIDs of interest. Only products with one of the specified OIDs will be read (unless READ_ALL is passed in)
typs - The TYPs of interest. Only products with one of the specified TYPs will be read (unless READ_ALL is passed in)
ptyps - The PTYPs of interest. Only products with one of the specified PTYPs will be read (unless READ_ALL is passed in)


Copyright © 2013 Ecebs Ltd. All Rights Reserved.