APIdia Launch Partner
Top Description Fields Constructors Methods
sun.security.smartcardio

pack-priv final Class TerminalImpl

extends CardTerminal
Class Inheritance
Imports
java.util.*, javax.smartcardio.*

CardTerminal implementation.
Author
Andreas Sterbenz
Since
1.6

Field Summary

Modifier and TypeField and Description
private CardImpl
pack-priv final long
pack-priv final String

Constructor Summary

AccessConstructor and Description
pack-priv
TerminalImpl(long contextId, String name)

Method Summary

Modifier and TypeMethod and Description
public synchronized Card
connect(String protocol)

Implements abstract javax.smartcardio.CardTerminal.connect.

Establishes a connection to the card.

public String
getName()

Implements abstract javax.smartcardio.CardTerminal.getName.

Returns the unique name of this terminal.

public boolean
isCardPresent()

Implements abstract javax.smartcardio.CardTerminal.isCardPresent.

Returns whether a card is present in this terminal.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

private boolean
waitForCard(boolean wantPresent, long timeout)

public boolean
waitForCardAbsent(long timeout)

Implements abstract javax.smartcardio.CardTerminal.waitForCardAbsent.

Waits until a card is absent in this terminal or the timeout expires.

public boolean
waitForCardPresent(long timeout)

Implements abstract javax.smartcardio.CardTerminal.waitForCardPresent.

Waits until a card is present in this terminal or the timeout expires.

Field Detail

cardback to summary
private CardImpl card
contextIdback to summary
pack-priv final long contextId
nameback to summary
pack-priv final String name

Constructor Detail

TerminalImplback to summary
pack-priv TerminalImpl(long contextId, String name)

Method Detail

connectback to summary
public synchronized Card connect(String protocol) throws CardException

Implements abstract javax.smartcardio.CardTerminal.connect.

Doc from javax.smartcardio.CardTerminal.connect.

Establishes a connection to the card. If a connection has previously established using the specified protocol, this method returns the same Card object as the previous call.

Exceptions
CardException:
if a connection could not be established using the specified protocol or if a connection has previously been established using a different protocol
getNameback to summary
public String getName()

Implements abstract javax.smartcardio.CardTerminal.getName.

Doc from javax.smartcardio.CardTerminal.getName.

Returns the unique name of this terminal.

isCardPresentback to summary
public boolean isCardPresent() throws CardException

Implements abstract javax.smartcardio.CardTerminal.isCardPresent.

Doc from javax.smartcardio.CardTerminal.isCardPresent.

Returns whether a card is present in this terminal.

Exceptions
CardException:
if the status could not be determined
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

waitForCardback to summary
private boolean waitForCard(boolean wantPresent, long timeout) throws CardException
waitForCardAbsentback to summary
public boolean waitForCardAbsent(long timeout) throws CardException

Implements abstract javax.smartcardio.CardTerminal.waitForCardAbsent.

Doc from javax.smartcardio.CardTerminal.waitForCardAbsent.

Waits until a card is absent in this terminal or the timeout expires. If the method returns due to an expired timeout, it returns false. Otherwise it return true.

If no card is present in this terminal when this method is called, it returns immediately.

Exceptions
CardException:
if the operation failed
waitForCardPresentback to summary
public boolean waitForCardPresent(long timeout) throws CardException

Implements abstract javax.smartcardio.CardTerminal.waitForCardPresent.

Doc from javax.smartcardio.CardTerminal.waitForCardPresent.

Waits until a card is present in this terminal or the timeout expires. If the method returns due to an expired timeout, it returns false. Otherwise it return true.

If a card is present in this terminal when this method is called, it returns immediately.

Exceptions
CardException:
if the operation failed