it.dtt.ca.event
Class SlotEvent

java.lang.Object
  extended by it.dtt.ca.event.CAEvent
      extended by it.dtt.ca.event.SlotEvent

public class SlotEvent
extends CAEvent

This event notifies user about changes in the slot status (e.g. if a smart card is present or not in the given slot). It notifies also about card insertion errors or if the box cannot communicate with the smart card for any reason.


Field Summary
static int CARD_ACCESS_DENIED
          Notifies that access to the card currently inserted in the slot is denied; this normally means that the card does not correspond to the current active service and CAS.
static int CARD_ERROR
          Notifies a smart card is inserted into the reader but wrong ATR is received (e.g. because of a damaged card").
static int CARD_IN
          Notifies a card insertion; this value is also returned when a card is present in the slot and a slot status check is performed.
static int CARD_MUTED
          Notifies that smart card is inserted into the reader but no ATR is retrieved because no electrical communication is established with the smart card (e.g.
static int CARD_OUT
          Notifies a card removal; this value is also returned when a card is not present in the slot and a slot status check is performed.
static int CARD_VERIFYING
          Notifies that the smart card is being verified
static int ERROR_UNKNOWN
          Notifies that status of the slot has not been retrieved yet
 
Fields inherited from class it.dtt.ca.event.CAEvent
CA_ACCESS_EVENT, CA_PRODUCT_EVENT, HISTORY_UPDATE_EVENT, NEW_MESSAGE_EVENT, PIN_REQUEST_EVENT, RECHARGE_EVENT, SLOT_EVENT, SMART_CARD_STATUS_EVENT
 
Constructor Summary
protected SlotEvent(Slot slot, java.lang.String description)
          Create a SlotEvent instance
 
Method Summary
 Slot getSlot()
          Gives the slot which generated the event.
 int getType()
          Returns the type of event that's arrived.
 
Methods inherited from class it.dtt.ca.event.CAEvent
getData, getDescription, getPrivateData, getSource, setPrivateData, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CARD_IN

public static final int CARD_IN
Notifies a card insertion; this value is also returned when a card is present in the slot and a slot status check is performed.

See Also:
Slot, Constant Field Values

CARD_OUT

public static final int CARD_OUT
Notifies a card removal; this value is also returned when a card is not present in the slot and a slot status check is performed.

See Also:
Slot, Constant Field Values

CARD_ERROR

public static final int CARD_ERROR
Notifies a smart card is inserted into the reader but wrong ATR is received (e.g. because of a damaged card").

See Also:
Slot, Constant Field Values

CARD_MUTED

public static final int CARD_MUTED
Notifies that smart card is inserted into the reader but no ATR is retrieved because no electrical communication is established with the smart card (e.g. card upside-down).

See Also:
Slot, Constant Field Values

CARD_ACCESS_DENIED

public static final int CARD_ACCESS_DENIED
Notifies that access to the card currently inserted in the slot is denied; this normally means that the card does not correspond to the current active service and CAS.

See Also:
Constant Field Values

CARD_VERIFYING

public static final int CARD_VERIFYING
Notifies that the smart card is being verified

See Also:
Constant Field Values

ERROR_UNKNOWN

public static final int ERROR_UNKNOWN
Notifies that status of the slot has not been retrieved yet

See Also:
Constant Field Values
Constructor Detail

SlotEvent

protected SlotEvent(Slot slot,
                    java.lang.String description)
Create a SlotEvent instance

Parameters:
slot - the slot generating the event
Method Detail

getSlot

public Slot getSlot()
Gives the slot which generated the event.

Returns:
the interested slot

getType

public int getType()
Returns the type of event that's arrived.

Specified by:
getType in class CAEvent
Returns:
type of event.
See Also:
CAEvent.SLOT_EVENT