opencard.core.event
Class CardTerminalEvent

java.lang.Object
  extended by java.util.EventObject
      extended by opencard.core.event.OpenCardEvent
          extended by opencard.core.event.CardTerminalEvent
All Implemented Interfaces:
java.io.Serializable

public class CardTerminalEvent
extends OpenCardEvent

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

Version:
$Id: CardTerminalEvent.java,v 1.2 1999/10/22 16:07:33 damke Exp $
Author:
Dirk Husemann (hud@zurich.ibm.com), Stephan Breideneich (sbreiden@de.ibm.com), Mike Wendler (mwendler@de.ibm.com)
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()
          Gets a printable representation of this object.
 
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

See Also:
Constant Field Values

CARD_REMOVED

public static final int CARD_REMOVED
a card was removed

See Also:
Constant Field Values
Constructor Detail

CardTerminalEvent

public CardTerminalEvent(CardTerminal terminal,
                         int id,
                         int slot)
Constructs an object of this class.

Parameters:
terminal - the object that created this event
id - one of [CARD_INSERTED/CARD_REMOVED]
slot - 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()
Description copied from class: OpenCardEvent
Gets a printable representation of this object.

Overrides:
toString in class OpenCardEvent
Returns:
a string representation of this object