org.opennfc.se
Interface SeSlotEventHandler


public interface SeSlotEventHandler

The interface to implement to monitor the events of the Secure Element slots.

Event handlers are registered with SeSlot.registerEventHandler()

Since:
Open NFC 4.3

Method Summary
 void onConnectivity(int messageCode, byte[] parameters)
          Called when a connectivity event is detected.
 void onHotPlugEvent(boolean inserted)
          Called when a hot-plug event occures.
 void onTransaction(ConnectionProperty protocol, byte[][] aidList, byte[] parameter)
          Called when a transaction event is detected.
 

Method Detail

onTransaction

void onTransaction(ConnectionProperty protocol,
                   byte[][] aidList,
                   byte[] parameter)
Called when a transaction event is detected.

Transaction events occur when a transaction is performed in card emulation. Such events are sent if SeSlot.supportTransactionEvent() returns true.

If a security policy is applied by the Secure Element, the transaction events for are only sent if the application implementing the event listener is allowed to access the aid used for the transaction.

Parameters:
protocol - the protocol used for the transaction. null for a Secure Element connected with SWP or if this information cannot be detected for this transaction.
aidList - the list of AIDs used for the transaction. null if this information cannot be detected for this transaction.
parameter - the extra parameters sent by the Secure Element with the transaction event. null is the Secure Element is not connected with SWP or if no extra parameters are sent.

onHotPlugEvent

void onHotPlugEvent(boolean inserted)
Called when a hot-plug event occures.

Hot-plug events may be sent by the Secure Element slot if SeSlot.supportHotPlugEvent() returns true.

Parameters:
inserted - true if the Secure Element was inserted, false if the Secure Element was removed.

onConnectivity

void onConnectivity(int messageCode,
                    byte[] parameters)
Called when a connectivity event is detected.

This event notifies the terminal host that it shall send a "HCI connectivity event" as defined in ETSI TS 102 223: "Smart Cards; Card Application Toolkit (CAT)". Such events are sent if SeSlot.supportConnectivityEvent() returns true.

Parameters:
messageCode - The message code value is application dependant.
parameters - The data included in the last connectivity event. null if this information cannot be detected for this event.

Copyright © 2010-2011 Inside Secure
Except as noted, this content is licensed under Apache 2.0 License.