|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--opencard.core.service.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. |
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 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 sendpublic final ResponseAPDU sendVerifiedAPDU(CommandAPDU command, CHVControl control, CHVDialog dialog, int timeout) throws 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.VerifiedAPDUInterface
,
CardHolderVerificationGUI
public void open() throws InvalidCardChannelException
owner
- the object now considered to be the owner of this channelpublic void close()
protected void closeFinal()
public void finalize()
public java.lang.String toString()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |