|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--opencard.core.service.CardService | +--opencard.opt.applet.BasicAppletCardService
This service offers methods to applications or proxies derived from it, which send a given command APDU to the card applet identified by the given application identifier and which return the result APDU. All instances associated with the same physical card share a common state object attached to the the used channel by the first BasicAppletCardService instance. This state object, an instance of CardState, keeps track of the currently selected applet and is used by BasicAppletCardServices to avoid unnecessary selection of applets.
CardServiceScheduler
,
CardChannel
,
AppletID
Constructor Summary | |
BasicAppletCardService()
|
Method Summary | |
protected AppletSelector |
getAppletSelector()
Get the applet selector. |
protected CardState |
getCardState(opencard.core.service.CardChannel channel)
Gets the associated state object. |
protected void |
initialize(opencard.core.service.CardServiceScheduler scheduler,
opencard.core.service.SmartCard card,
boolean blocking)
Instantiates a BasicAppletCardService and tie it both to its CardServiceScheduler and its using SmartCard object. |
opencard.core.terminal.ResponseAPDU |
sendCommandAPDU(AppletID appletID,
opencard.core.terminal.CommandAPDU commandAPDU)
Sends a CommandAPDU to the applet on the card that has the given application identifier. |
protected opencard.core.terminal.ResponseAPDU |
sendCommandAPDU(opencard.core.service.CardChannel channel,
AppletID appletID,
opencard.core.terminal.CommandAPDU commandAPDU)
Sends a CommandAPDU to the applet on the card that has the given application identifier using the given channel. |
protected opencard.core.terminal.ResponseAPDU |
sendVerifiedAPDU(opencard.core.service.CardChannel channel,
AppletID appletID,
opencard.core.terminal.CommandAPDU verificationAPDU,
opencard.core.terminal.CHVControl chvControl,
int timeout)
Send a verify CHV command APDU to the card applet with the given application identifier after filling in the password obtained from the CHV dialog currently associated with this card service. |
protected void |
setAppletSelector(AppletSelector s)
Set the applet selector. Subclasses may need to redefine the way applet selection is performed. |
Methods inherited from class opencard.core.service.CardService |
allocateCardChannel,
getCard,
getCardChannel,
getCHVDialog,
releaseCardChannel,
setCardChannel,
setCHVDialog |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public BasicAppletCardService()
Method Detail |
protected AppletSelector getAppletSelector()
protected CardState getCardState(opencard.core.service.CardChannel channel)
protected void initialize(opencard.core.service.CardServiceScheduler scheduler, opencard.core.service.SmartCard card, boolean blocking) throws opencard.core.service.CardServiceException
scheduler
- The scheduler of this CardExecutiveCardService.card
- The controlling SmartCard object.blocking
- Specify the wait behavior for obtaining a CardChannel
from the CardServiceScheduler.protected opencard.core.terminal.ResponseAPDU sendCommandAPDU(opencard.core.service.CardChannel channel, AppletID appletID, opencard.core.terminal.CommandAPDU commandAPDU) throws opencard.core.terminal.CardTerminalException, opencard.core.service.CardServiceException
channel
- channel to be used for sending APDUs to the smart cardappletID
- application identifier of destination appletcommandAPDU
- CommandAPDU to sendpublic opencard.core.terminal.ResponseAPDU sendCommandAPDU(AppletID appletID, opencard.core.terminal.CommandAPDU commandAPDU) throws opencard.core.terminal.CardTerminalException, opencard.core.service.CardServiceException
appletID
- application identifier of destination appletcommandAPDU
- CommandAPDU to sendprotected opencard.core.terminal.ResponseAPDU sendVerifiedAPDU(opencard.core.service.CardChannel channel, AppletID appletID, opencard.core.terminal.CommandAPDU verificationAPDU, opencard.core.terminal.CHVControl chvControl, int timeout) throws opencard.core.service.CardServiceException, opencard.core.terminal.CardTerminalException
channel
- The CardChannel to be used for
sending the command APDU.appletID
- The application identifier of the applet
to which the verification APDU shall be sent.verificationAPDU
- The command APDU for password verification
into which the password shall be inserted.chvControl
- The CHV control to be used for password input.timeout
- The timeout to be used.protected void setAppletSelector(AppletSelector s)
Subclasses may need to redefine the way applet selection is performed. They can do that by specifying a class implementing "AppletSelector" and call setAppletSelector with a new helper object that will be used in place of the default ISO implementation.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |