opencard.core.event
Class CardTerminalEvent

java.lang.Object
  |
  +--java.util.EventObject
        |
        +--opencard.core.event.OpenCardEvent
              |
              +--opencard.core.event.CardTerminalEvent

public class CardTerminalEvent
extends OpenCardEvent

A CardTerminalEvent signals the insertion or removal of a smart card.

See Also:
Serialized Form

Field Summary
static int CARD_INSERTED
          a card was inserted
static int CARD_REMOVED
          a card was removed
 
Fields inherited from class opencard.core.event.OpenCardEvent
id
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
CardTerminalEvent(CardTerminal terminal, int id, int slot)
          Constructs an object of this class.
 
Method Summary
 CardTerminal getCardTerminal()
          Gets the CardTerminal associated with the event.
 Slot getSlot()
          Deprecated. use getSlotID() instead
 int getSlotID()
           
 java.lang.String toString()
           
 
Methods inherited from class java.util.EventObject
getSource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CARD_INSERTED

public static final int CARD_INSERTED
a card was inserted

CARD_REMOVED

public static final int CARD_REMOVED
a card was removed
Constructor Detail

CardTerminalEvent

public CardTerminalEvent(CardTerminal terminal,
                         int id,
                         int slot)
Constructs an object of this class.
Parameters:
source - the object that created this event
id - one of [CARD_INSERTED/CARD_REMOVED]
aSlot - the slot where a card was inserted or removed
Method Detail

getCardTerminal

public CardTerminal getCardTerminal()
Gets the CardTerminal associated with the event.
Returns:
the terminal causing this event.

getSlot

public Slot getSlot()
Deprecated. use getSlotID() instead
Returns:
the Slot object where a card was inserted or removed.

getSlotID

public int getSlotID()
Returns:
the slot number where a card was inserted or removed.

toString

public java.lang.String toString()
Returns:
a string representation of this object
Overrides:
toString in class OpenCardEvent