|
Java Smart Card I/O | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectjavax.smartcardio.CardTerminal
public abstract class CardTerminal
A Smart Card terminal, sometimes refered to as a Smart Card Reader. A CardTerminal object can be obtained by calling CardTerminals.list() or CardTerminals.getTerminal().
Note that physical card readers with slots for multiple cards are
represented by one CardTerminal object per such slot.
CardTerminals,
TerminalFactory| Constructor Summary | |
|---|---|
protected |
CardTerminal()
Constructs a new CardTerminal object. |
| Method Summary | |
|---|---|
abstract Card |
connect(String protocol)
Establishes a connection to the card. |
abstract String |
getName()
Returns the unique name of this terminal. |
abstract boolean |
isCardPresent()
Returns whether a card is present in this terminal. |
abstract boolean |
waitForCardAbsent(long timeout)
Waits until a card is absent in this terminal or the timeout expires. |
abstract boolean |
waitForCardPresent(long timeout)
Waits until a card is present in this terminal or the timeout expires. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected CardTerminal()
This constructor is called by subclasses only. Application should call list() or getTerminal() to obtain a CardTerminal object.
| Method Detail |
|---|
public abstract String getName()
public abstract Card connect(String protocol)
throws CardException
protocol - the protocol to use ("T=0", "T=1", or "T=CL"), or "*" to
connect using any available protocol.
NullPointerException - if protocol is null
IllegalArgumentException - if protocol is an invalid protocol
specification
CardNotPresentException - if no card is present in this terminal
CardException - if a connection could not be established
using the specified protocol or if a connection has previously been
established using a different protocol
SecurityException - if a SecurityManager exists and the
caller does not have the required
permission
public abstract boolean isCardPresent()
throws CardException
CardException - if the status could not be determined
public abstract boolean waitForCardPresent(long timeout)
throws CardException
If a card is present in this terminal when this method is called, it returns immediately.
timeout - if positive, block for up to timeout
milliseconds; if zero, block indefinitely; must not be negative
IllegalArgumentException - if timeout is negative
CardException - if the operation failed
public abstract boolean waitForCardAbsent(long timeout)
throws CardException
If no card is present in this terminal when this method is called, it returns immediately.
timeout - if positive, block for up to timeout
milliseconds; if zero, block indefinitely; must not be negative
IllegalArgumentException - if timeout is negative
CardException - if the operation failed
|
Java Smart Card I/O | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
Copyright © 2005, 2010, Oracle and/or its affiliates. All rights reserved.