OpenCard  
 
OCF, the OpenCard Framework is a standard Java framework for working with Smart Cards.  
 

com.gemplus.opencard.terminal
Class GemCoreCardTerminal

java.lang.Object
  |
  +--opencard.core.terminal.CardTerminal
        |
        +--com.gemplus.opencard.terminal.GemplusSerialCardTerminal
              |
              +--com.gemplus.opencard.terminal.GemCoreCardTerminal

public class GemCoreCardTerminal
extends com.gemplus.opencard.terminal.GemplusSerialCardTerminal

PureJava-Implementation of an OpenCard CardTerminal for GemPlus GemCore-based reader (GCR410, GCR700) using the javax.comm package. IMPORTANT: with jdk1.1 javax.comm works only with signed applets !!!

Version:
$Id: GemCoreCardTerminal.java,v 1.1 1999/12/02 16:05:58 damke Exp $
See Also:
CardTerminal, CardTerminalRegistry, CardTerminalFactory, Slot, CardID

Fields inherited from class opencard.core.terminal.CardTerminal
address, name, slots, type
 
Constructor Summary
protected GemCoreCardTerminal(java.lang.String name, java.lang.String type, java.lang.String serialDevice)
          Instantiates a GemCoreCardTerminal object with one slot.
 
Method Summary
protected  java.lang.String getFirmwareVersion()
          gets the firmware version from the reader
 ResponseAPDU internalSendAPDU(int slotID, CommandAPDU capdu, int ms)
          The internalSendAPDU
 void open()
          open serial port and init transfer protocol
protected  void powerDownCard(int slotID)
          power down card
 byte[] powerUpCard(int slotID)
          power up card (with reset)
protected  void UpdateCardStatus(int slotID)
          updates the card status from a slot.
 
Methods inherited from class com.gemplus.opencard.terminal.GemplusSerialCardTerminal
clearDisplay, close, display, getCachedCardStatus, getCardID, getCardID, getReaderClosed, internalFeatures, internalReset, internalSendAPDU, isCardPresent, keyboardInput, open, poll, powerDownCard, powerDownCard, powerUpCard, powerUpCard, promptUser, protocolTransmit, selectAuxiliaryIcc, sendTerminalCommand, setCachedCardStatus, setReaderClosed, toString, tracerDebug, tracerError
 
Methods inherited from class opencard.core.terminal.CardTerminal
addSlots, cardInserted, cardRemoved, closeSlotChannel, enumerateSlots, features, getAddress, getName, getSlot, getSlots, getType, internalCloseSlotChannel, internalOpenSlotChannel, internalOpenSlotChannel, isCardPresent, isSlotChannelAvailable, isSlotChannelAvailable, openSlotChannel, openSlotChannel, openSlotChannel, reset, reset, sendAPDU, sendAPDU, sendVerifiedCommandAPDU, slots
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GemCoreCardTerminal

protected GemCoreCardTerminal(java.lang.String name,
                              java.lang.String type,
                              java.lang.String serialDevice)
                       throws CardTerminalException
Instantiates a GemCoreCardTerminal object with one slot.
Parameters:
name - The user friendly name.
type - The terminal type (in this case GCR410 or GCR700).
serialDevice - The device name used for reader communication (e.g. COM1).
Throws:
CardTerminalException - Thrown when the instantiation fails for any reason.
Method Detail

open

public void open()
          throws CardTerminalException
open serial port and init transfer protocol
Throws:
CardTerminalException - Thrown in case of errors during init process.
Overrides:
open in class com.gemplus.opencard.terminal.GemplusSerialCardTerminal

getFirmwareVersion

protected java.lang.String getFirmwareVersion()
                                       throws CardTerminalException
gets the firmware version from the reader
Overrides:
getFirmwareVersion in class com.gemplus.opencard.terminal.GemplusSerialCardTerminal

UpdateCardStatus

protected void UpdateCardStatus(int slotID)
                         throws CardTerminalException
updates the card status from a slot.
Parameters:
slotID - The slot number of the slot requesting the status.
Throws:
CardTerminalException - Thrown when error occurred getting status from reader.
Overrides:
UpdateCardStatus in class com.gemplus.opencard.terminal.GemplusSerialCardTerminal

powerUpCard

public byte[] powerUpCard(int slotID)
                   throws CardTerminalException
power up card (with reset)
Parameters:
slotID - slot number with the inserted card
Throws:
CardTerminalException - Thrown when power up method failed.
Overrides:
powerUpCard in class com.gemplus.opencard.terminal.GemplusSerialCardTerminal

powerDownCard

protected void powerDownCard(int slotID)
                      throws CardTerminalException
power down card
Parameters:
slotID - slot number with the inserted card
Throws:
CardTerminalException - Thrown when power down method failed.
Overrides:
powerDownCard in class com.gemplus.opencard.terminal.GemplusSerialCardTerminal

internalSendAPDU

public ResponseAPDU internalSendAPDU(int slotID,
                                     CommandAPDU capdu,
                                     int ms)
                              throws CardTerminalException
The internalSendAPDU
Parameters:
slot - The slot number of the slot used.
capdu - The CommandAPDU to send.
ms - A timeout in milliseconds.
Returns:
A ResponseAPDU.
Throws:
CardTerminalException - Thrown when internalSendAPDU method failed.
Overrides:
internalSendAPDU in class com.gemplus.opencard.terminal.GemplusSerialCardTerminal