opencard.opt.emv.mgmt
Class BasicEMVAppletAccess

java.lang.Object
  extended by opencard.core.service.CardService
      extended by opencard.opt.applet.mgmt.AbstractAppletAccessor
          extended by opencard.opt.emv.mgmt.BasicEMVAppletAccess
All Implemented Interfaces:
OpenCardConstants, AppletSelector, AppletAccessCardService, EMVTags, CardServiceInterface

public class BasicEMVAppletAccess
extends AbstractAppletAccessor
implements AppletAccessCardService, OpenCardConstants, EMVTags

The BasicEMVAppletAccess provides an implementation of an AppletAccessCardService for EMV compliant cards supporting a T=1 protocol (T=0 is not implemented).

This class is derived from the abstract implementation AbstractAppletAccessor, which provides the more generic and card independent functionality. In order to support similar cards, with slightly changed command set, this class be be subclassed in order to get adopted implementations.

Version:
$Id: BasicEMVAppletAccess.java,v 1.1 1999/11/23 10:24:17 damke Exp $
Author:
Thomas Stober (tms@de.ibm.com)
See Also:
AppletAccessCardService, AbstractAppletAccessor

Field Summary
static byte CLASS
           
static byte[] DIR_PATH
           
static byte READ_INS
           
static byte READ_LE
           
static byte READ_P2
           
static byte SELECT_INS
           
static byte SELECT_LE
           
static byte SELECT_P1
           
static byte SELECT_P2
           
static int SW_DATA_CORRUPTED
           
static int SW_FILEINVALIDATED
           
static int SW_FILENOTFOUND
           
static int SW_INCOMPATIBLE
           
static int SW_INCORRECT_CLA
           
static int SW_INCORRECT_INS
           
static int SW_INCORRECT_LC
           
static int SW_INCORRECT_P1P2
           
static int SW_MFCFILENOTFOUND
           
static int SW_NOTSUPPORTED
           
static int SW_OK
           
static int SW_RECORDNOTFOUND
           
static int SW_WRONG_LENGTH
           
static byte SW1_INCORRECT_LE
           
static byte SW1_INCORRECT_P1P2
           
static byte SW1_RESPONSE_PENDING
           
 
Fields inherited from interface opencard.core.OpenCardConstants
APPID_ENCODING, CARD_SERVICE_CACHEPATH, CARD_SERVICE_CACHETIME, CARD_SERVICE_CHECK, CARD_SERVICE_LISTER_CLASS, CARD_SERVICE_REGISTRY_TAG, CARD_SERVICE_URL, CARD_TERMINAL_REGISTRY_TAG, DEFAULT_OPENCARD_LOADER_CLASSNAME, OPENCARD_DOTPROPERTIES, OPENCARD_PROPERTIES, OPENCARD_PROPERTY, SMARTCARD_REMOVED
 
Fields inherited from interface opencard.opt.emv.mgmt.EMVTags
EMV_EF_DIR, MASTER_FILE, TAG_EMV_ADF_NAME, TAG_EMV_APP_DISCR_DATA, TAG_EMV_APP_LABEL, TAG_EMV_APP_PREF_NAME, TAG_EMV_APP_PRIO_IND, TAG_EMV_APP_TEMPLATE, TAG_EMV_CMD_TO_PERFORM, TAG_EMV_DDF_NAME, TAG_EMV_SFI
 
Constructor Summary
BasicEMVAppletAccess()
          Instantiate a BasicEMVAppletAccess object.
 
Method Summary
 void initialize(CardServiceScheduler scheduler, SmartCard smartcard, boolean blocking)
          Initializes this CardService and retrieves the Cards directory into a vector.
protected  java.util.Vector internalList(SlotChannel channel)
          Reads the applications info informations from the EMV Directory.
 
Methods inherited from class opencard.opt.applet.mgmt.AbstractAppletAccessor
exists, getApplets, getAppletSelector, getInfo, list, selectApplet, setApplets, setAppletSelector
 
Methods inherited from class opencard.core.service.CardService
allocateCardChannel, getCard, getCardChannel, getCHVDialog, releaseCardChannel, setCardChannel, setCHVDialog
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface opencard.opt.applet.mgmt.AppletAccessCardService
exists, getInfo, list
 
Methods inherited from interface opencard.opt.service.CardServiceInterface
getCard, setCHVDialog
 

Field Detail

CLASS

public static final byte CLASS
See Also:
Constant Field Values

SELECT_INS

public static final byte SELECT_INS
See Also:
Constant Field Values

SELECT_P1

public static final byte SELECT_P1
See Also:
Constant Field Values

SELECT_P2

public static final byte SELECT_P2
See Also:
Constant Field Values

SELECT_LE

public static final byte SELECT_LE
See Also:
Constant Field Values

READ_INS

public static final byte READ_INS
See Also:
Constant Field Values

READ_P2

public static final byte READ_P2
See Also:
Constant Field Values

READ_LE

public static final byte READ_LE
See Also:
Constant Field Values

DIR_PATH

public static byte[] DIR_PATH

SW_OK

public static final int SW_OK
See Also:
Constant Field Values

SW_WRONG_LENGTH

public static final int SW_WRONG_LENGTH
See Also:
Constant Field Values

SW_INCORRECT_INS

public static final int SW_INCORRECT_INS
See Also:
Constant Field Values

SW_INCORRECT_CLA

public static final int SW_INCORRECT_CLA
See Also:
Constant Field Values

SW_INCORRECT_P1P2

public static final int SW_INCORRECT_P1P2
See Also:
Constant Field Values

SW_INCORRECT_LC

public static final int SW_INCORRECT_LC
See Also:
Constant Field Values

SW_DATA_CORRUPTED

public static final int SW_DATA_CORRUPTED
See Also:
Constant Field Values

SW_INCOMPATIBLE

public static final int SW_INCOMPATIBLE
See Also:
Constant Field Values

SW_NOTSUPPORTED

public static final int SW_NOTSUPPORTED
See Also:
Constant Field Values

SW_FILENOTFOUND

public static final int SW_FILENOTFOUND
See Also:
Constant Field Values

SW_MFCFILENOTFOUND

public static final int SW_MFCFILENOTFOUND
See Also:
Constant Field Values

SW_RECORDNOTFOUND

public static final int SW_RECORDNOTFOUND
See Also:
Constant Field Values

SW_FILEINVALIDATED

public static final int SW_FILEINVALIDATED
See Also:
Constant Field Values

SW1_INCORRECT_P1P2

public static final byte SW1_INCORRECT_P1P2
See Also:
Constant Field Values

SW1_RESPONSE_PENDING

public static final byte SW1_RESPONSE_PENDING
See Also:
Constant Field Values

SW1_INCORRECT_LE

public static final byte SW1_INCORRECT_LE
See Also:
Constant Field Values
Constructor Detail

BasicEMVAppletAccess

public BasicEMVAppletAccess()
                     throws CardServiceException
Instantiate a BasicEMVAppletAccess object.

Throws:
CardServiceException
Method Detail

initialize

public void initialize(CardServiceScheduler scheduler,
                       SmartCard smartcard,
                       boolean blocking)
                throws CardServiceException
Initializes this CardService and retrieves the Cards directory into a vector.

Overrides:
initialize in class CardService
Parameters:
scheduler - where to allocate channels
smartcard - which smartcard to contact
blocking - whether operation shall be blocking
Throws:
CardServiceException - thrown, when Directory could not be read
See Also:
CardServiceFactory

internalList

protected java.util.Vector internalList(SlotChannel channel)
                                 throws CardServiceException
Reads the applications info informations from the EMV Directory.

Implements the abstract method of the superclass AbstractAppletAccess for EMV compliant cards.

Specified by:
internalList in class AbstractAppletAccessor
Returns:
An Vector of EMVAppletInfo Object representing the card-resident applets.
Throws:
CardServiceException - Thrown when the list cannot be presented.