uicc.hci.services.cardemulation
Interface CardEmulationListener

All Superinterfaces:
HCIListener, javacard.framework.Shareable

public interface CardEmulationListener
extends HCIListener

An instance implementing CardEmulationListener is used by an Applet to monitor the ContactlessCardEmulationService.

See Also:
ContactlessCardEmulationService

Field Summary
static byte EVENT_CARD_ACTIVATED
          This value is used to trigger the Applet when the HCI event EVT_CARD_ACTIVATED is received.
static byte EVENT_CARD_DEACTIVATED
          This value is used to trigger the Applet when the HCI event EVT_CARD_DEACTIVATED is received.
static byte EVENT_FIELD_OFF
          This value is used to notify the Applet when the HCI event EVT_FIELD_OFF is received.
static byte EVENT_FIELD_ON
          This value is used to notify the Applet when the HCI event EVT_FIELD_ON is received.
static byte EVENT_GET_PARAMETER_RESPONSE
          This value is used to notify the Applet when a response to the CardEmulationMessage.prepareAndSendGetParameterCommmand(byte) is received.
static byte EVENT_ON_SEND_DATA
          This value is used to notify the Applet when the HCI event EVT_SEND_DATA is received.
 
Fields inherited from interface uicc.hci.framework.HCIListener
TRIG_NO_MORE_PROCESS
 
Method Summary
 byte onCallBackTriggering(byte callback, CardEmulationMessage message)
          This method is called by the HCI framework in 3 situations: 1.
 
Methods inherited from interface uicc.hci.framework.HCIListener
onCallBack
 

Field Detail

EVENT_GET_PARAMETER_RESPONSE

static final byte EVENT_GET_PARAMETER_RESPONSE
This value is used to notify the Applet when a response to the CardEmulationMessage.prepareAndSendGetParameterCommmand(byte) is received. The Applet shall return this value to the HCI framework if it wants to be notified about the outcome of the GetParameterCommand.

See Also:
Constant Field Values

EVENT_ON_SEND_DATA

static final byte EVENT_ON_SEND_DATA
This value is used to notify the Applet when the HCI event EVT_SEND_DATA is received. This constant can be used in HCIService.activateEvent() and HCIService.deactivateEvent().

See Also:
Constant Field Values

EVENT_FIELD_ON

static final byte EVENT_FIELD_ON
This value is used to notify the Applet when the HCI event EVT_FIELD_ON is received. This constant can be used in HCIService.activateEvent() and HCIService.deactivateEvent().

See Also:
Constant Field Values

EVENT_FIELD_OFF

static final byte EVENT_FIELD_OFF
This value is used to notify the Applet when the HCI event EVT_FIELD_OFF is received. This constant can be used in HCIService.activateEvent() and HCIService.deactivateEvent().

See Also:
Constant Field Values

EVENT_CARD_DEACTIVATED

static final byte EVENT_CARD_DEACTIVATED
This value is used to trigger the Applet when the HCI event EVT_CARD_DEACTIVATED is received. This constant can be used in HCIService.activateEvent() and HCIService.deactivateEvent().

See Also:
Constant Field Values

EVENT_CARD_ACTIVATED

static final byte EVENT_CARD_ACTIVATED
This value is used to trigger the Applet when the HCI event EVT_CARD_ACTIVATED is received. This constant can be used in HCIService.activateEvent() and HCIService.deactivateEvent().

See Also:
Constant Field Values
Method Detail

onCallBackTriggering

byte onCallBackTriggering(byte callback,
                          CardEmulationMessage message)
This method is called by the HCI framework in 3 situations: 1. A predefined condition (see HCIService.activateEvent()) is fulfilled. 2. A certain return value on a previous invocation of this method was returned. 3. When a previous call to the method HCIService.requestCallBackNotification()from the same Applet was made. (editor's note: 1. align all methods with the word fragment 'triggering'. 2. improve wording )

Parameters:
event - the condition caused this invocation of onCallBack()
message - the HCIMessage
Returns:
condition for next invocation:
  • HCIListener.TRIG_NO_MORE_PROCESS: the listener does not request to be called back
  • value greater than 0: The listener request to be call back as soon as possible with the given triggering condition. The specific values are listed in the documentation of the sub interfaces.
  • value less than 0: forbidden (will be ignored).