|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectopencard.core.service.CardChannel
public class CardChannel
A communication channel to a smartcard.
A channel is used to exchange APDUs with an associated smartcard.
Additionally, it can be used to access some other resources related
to the associated card, like the terminal into which it is inserted.
CardChannel is the card service layer pendant to the terminal
layer's SlotChannel. The slot channel is a physical channel,
onto which several logical card channels can be multiplexed if the
smartcard supports logical channels.
SlotChannel
,
CardServiceScheduler
Constructor Summary | |
---|---|
protected |
CardChannel(SlotChannel slotchannel)
Instantiate a new logical card channel. |
Method Summary | |
---|---|
void |
close()
Closes this CardChannel. |
protected void |
closeFinal()
Closes this CardChannel so it cannot be opened anymore. |
void |
finalize()
Tries to clean up. |
CardTerminal |
getCardTerminal()
Returns the card terminal associated with this channel. |
SlotChannel |
getSlotChannel()
Return the slot channel associated with this channel. |
java.lang.Object |
getState()
Retrieves the service specific object associated with this channel. |
boolean |
isOpen()
Checks whether this channel is currently open. |
void |
open()
Opens this CardChannel. |
ResponseAPDU |
sendCommandAPDU(CommandAPDU cmdAPDU)
Sends a CommandAPDU to the smart card. |
ResponseAPDU |
sendVerifiedAPDU(CommandAPDU command,
CHVControl control,
CHVDialog dialog)
Sends a command including a PIN to the smart card within a given time. |
ResponseAPDU |
sendVerifiedAPDU(CommandAPDU command,
CHVControl control,
CHVDialog dialog,
int timeout)
Deprecated. |
void |
setState(java.lang.Object state)
Stores a service specific object associated with this channel. |
java.lang.String |
toString()
Returns a string representation of this card channel. |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
protected CardChannel(SlotChannel slotchannel)
slotchannel
- the physical channel to the smartcardMethod Detail |
---|
public final boolean isOpen()
public CardTerminal getCardTerminal()
SlotChannel
,
Slot
public SlotChannel getSlotChannel()
public final void setState(java.lang.Object state)
state
- the object to associate with this channel,
or null to reset previous associationsgetState()
public final java.lang.Object getState()
setState(java.lang.Object)
public ResponseAPDU sendCommandAPDU(CommandAPDU cmdAPDU) throws InvalidCardChannelException, CardTerminalException
cmdAPDU
- the CommandAPDU to send
InvalidCardChannelException
- This channel is currently not open.
CardTerminalException
public final ResponseAPDU sendVerifiedAPDU(CommandAPDU command, CHVControl control, CHVDialog dialog, int timeout) throws InvalidCardChannelException, CardTerminalException, CardServiceInvalidCredentialException
InvalidCardChannelException
CardTerminalException
CardServiceInvalidCredentialException
public final ResponseAPDU sendVerifiedAPDU(CommandAPDU command, CHVControl control, CHVDialog dialog) throws InvalidCardChannelException, CardTerminalException, CardServiceInvalidCredentialException
command
- the CommandAPDU to sendcontrol
- the verification parameters to usedialog
- the dialog to use to query a password.
Ignored if the terminal takes the reponsibility
for querying the password or PIN. The default
dialog is used if this argument is null.
InvalidCardChannelException
- This channel is currently not open.
CardTerminalException
- The terminal encountered an error.
CardServiceInvalidCredentialException
- The user cancelled password input.VerifiedAPDUInterface
,
CardHolderVerificationGUI
public void open() throws InvalidCardChannelException
InvalidCardChannelException
- This channel is already open, or closed for good.public void close()
protected void closeFinal()
public void finalize()
finalize
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |