uicc.hci.framework
Class HCIDevice

java.lang.Object
  extended by uicc.hci.framework.HCIDevice

public final class HCIDevice
extends java.lang.Object

This class provides a factory to retrieve objects instances that implement sub interfaces of HCIService and a method to check it certain features are supported by the UII or the terminal.


Field Summary
static short AUTO_ACTIVATE_SERVICE_ID
          Identifies the feature of automated sending of the proactive command ACTIVATE
static short CARD_EMULATION_SERVICE_ID
          Identifies the service object for card emulation mode functionality
static short CONNECTIVITY_SERVICE_ID
          Identifies the service object for connectivity functionality
static byte FULL_POWER_MODE
          UICC is activated in full power mode
static byte LOW_POWER_MODE
          UICC is activated in low power mode
static short READER_SERVICE_ID
          Identifies the service object for reader mode functionality
 
Method Summary
static HCIService getHCIService(short serviceID)
          This method is used to retrieve an instances that implement one of HCIService subinterfaces defined in this specification.
static byte getPowerMode()
          This method returns the current power mode of the UICC as defined in TS 102 613.
static byte isHCIServiceAvailable(short serviceID)
          This method is used to retrieve information about the availability of a HCIService or about the availability of a feature of the contacless framework.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

READER_SERVICE_ID

public static final short READER_SERVICE_ID
Identifies the service object for reader mode functionality

See Also:
Constant Field Values

CARD_EMULATION_SERVICE_ID

public static final short CARD_EMULATION_SERVICE_ID
Identifies the service object for card emulation mode functionality

See Also:
Constant Field Values

CONNECTIVITY_SERVICE_ID

public static final short CONNECTIVITY_SERVICE_ID
Identifies the service object for connectivity functionality

See Also:
Constant Field Values

AUTO_ACTIVATE_SERVICE_ID

public static final short AUTO_ACTIVATE_SERVICE_ID
Identifies the feature of automated sending of the proactive command ACTIVATE

See Also:
Constant Field Values

LOW_POWER_MODE

public static final byte LOW_POWER_MODE
UICC is activated in low power mode

See Also:
Constant Field Values

FULL_POWER_MODE

public static final byte FULL_POWER_MODE
UICC is activated in full power mode

See Also:
Constant Field Values
Method Detail

getHCIService

public static HCIService getHCIService(short serviceID)
                                throws HCIException,
                                       javacard.framework.SystemException
This method is used to retrieve an instances that implement one of HCIService subinterfaces defined in this specification.

This method returns null if the Applet.register() method has not yet been invoked.

If the Applet instance invoking this method passes CARD_EMULATION_SERVICE_ID as parameter, and the the Communication Interface Access Configuration of this Applet instance does not allow "Proximity based communication" according to clause 5 of GlobaPlatform Card Specification Amendment [8], a HCIExceptions with reason code HCI_ACCESS_NOT_GRANTED shall be thrown.

If no "Parameters for contactless applications" as defined in ETSI TS 102 226 [7] have been assigned to the Applet instance invoking this method and passing READER_SERVICE_ID as parameter, a HCIException with reason code HCI_ACCES_NOT_GRANTED shall be thrown.

Parameters:
serviceID - shall be one of the constants (*)_SERVICE_ID defined in this class.
Returns:
reference to the permanent JCRE entry point object of the HCIService or null if not yet registered.
Throws:
HCIException - with reason:
  • HCI_ACCESS_NOT_GRANTED if access to the indicated service is not permitted for the Applet
  • HCI_SERVICE_NOT_AVAILABLE if the requested service type is not available
javacard.framework.SystemException - with the following reason code:
  • ILLEGAL_VALUE
    • if the serviceID does not match with the predefined values

getPowerMode

public static byte getPowerMode()
This method returns the current power mode of the UICC as defined in TS 102 613. Possible values are:

Returns:
the current power mode or -1 if the power mode can not be retrieved

isHCIServiceAvailable

public static byte isHCIServiceAvailable(short serviceID)
                                  throws HCIException
This method is used to retrieve information about the availability of a HCIService or about the availability of a feature of the contacless framework.

If the Applet instance invoking this method passes CARD_EMULATION_SERVICE_ID as parameter and the the Communication Interface Access Configuration of this Applet instance does not allow "Proximity based communication" according to clause 5 of GlobaPlatform Card Specification Amendment [8], a, the return value shall indicate "access not allowed for Applet".

If no "Parameters for contactless applications" as defined in ETSI TS 102 226 [7] have been assigned to the Applet instance invoking this method and passing READER_SERVICE_ID as parameter the return value shall indicate "access not allowed for Applet".

Parameters:
serviceID - shall be one of the constants (*)_SERVICE_ID defined in this class
Returns:
byte with the bit values set according to the following list:
  • bit 0 set to 1: SWP/HCI interface not supported by terminal
  • bit 1 set to 1: requested service not supported by terminal
  • bit 2 set to 1: access not allowed for Applet
  • bit 3 set to 1: HCI interface currently disabled in UICC
  • bit 4 set to 1: service not supported in the UICC
  • bit 5 set to 0: (RFU)
  • bit 6 set to 0: (RFU)
  • bit 7 set to 0: (RFU)
Throws:
HCIException - with reason:
  • HCI_SERVICE_NOT_AVAILABLE if the requested service type of feature is not know to the contactless runtime environment