it.dtt.ca.event
Class CreditsEvent

java.lang.Object
  extended by it.dtt.ca.event.CAEvent
      extended by it.dtt.ca.event.SmartCardEvent
          extended by it.dtt.ca.event.CreditsEvent

public class CreditsEvent
extends SmartCardEvent

Notifies that the credit on the smart card changed.


Field Summary
static int CREDIT_CHANGED
          Notifies that the credit on the card is changed.
 
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 CreditsEvent(SmartCard smartCard, java.lang.Object data, java.lang.String description, Wallet wallet)
           
 
Method Summary
 int getType()
          Returns the type of event that's arrived.
 Wallet getWallet()
          Retrieves the wallet on the given card, generating the credit update event
 
Methods inherited from class it.dtt.ca.event.SmartCardEvent
getSmartCard
 
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

CREDIT_CHANGED

public static final int CREDIT_CHANGED
Notifies that the credit on the card is changed. This value should be returned by getType method.

See Also:
Constant Field Values
Constructor Detail

CreditsEvent

protected CreditsEvent(SmartCard smartCard,
                       java.lang.Object data,
                       java.lang.String description,
                       Wallet wallet)
Parameters:
smartCard - the smart card generating the event
data - event related data
description - description of the event
wallet - the wallet generating the event on the given card
Method Detail

getWallet

public Wallet getWallet()
Retrieves the wallet on the given card, generating the credit update event

Returns:
the wallet

getType

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

Specified by:
getType in class CAEvent
Returns:
type of event, which shall always have type CAEvent.CREDITS_EVENT.
See Also:
CAEvent.CA_ACCESS_EVENT, CAEvent.CA_PRODUCT_EVENT, CAEvent.NEW_MESSAGE_EVENT, CAEvent.PIN_REQUEST_EVENT, CAEvent.RECHARGE_EVENT, CAEvent.SLOT_EVENT, CAEvent.HISTORY_UPDATE_EVENT, CAEvent.SMART_CARD_STATUS_EVENT