opencard.opt.applet
Class AppletProxy
java.lang.Object
|
+--opencard.core.service.CardService
|
+--opencard.opt.applet.BasicAppletCardService
|
+--opencard.opt.applet.AppletProxy
- public abstract class AppletProxy
- extends BasicAppletCardService
AppletProxy is the base class for all applet proxies. This class is
derived from the class BasicAppletCardService. It adds an attribute
that holds the application identifier of the applet to which the applet
proxy is associated. It provides methods similar to those of the base class,
except that the application identifier parameter is not necessary because
every AppletProxy knows the AID of the applet associated with it.
- Since:
- OCF1.2
Method Summary |
AppletID |
getAppletID()
Gets the application identifier of the applet to which this proxy belongs. |
protected void |
initialize(AppletID appletID,
opencard.core.service.CardServiceScheduler scheduler,
opencard.core.service.SmartCard card,
boolean blocking)
Instantiate an AppletProxy and associates it with the card
applet with the given application identifier. |
protected opencard.core.terminal.ResponseAPDU |
sendCommandAPDU(opencard.core.service.CardChannel channel,
opencard.core.terminal.CommandAPDU commandAPDU)
Sends an APDU to the applet to which this proxy belongs, using the given channel. |
opencard.core.terminal.ResponseAPDU |
sendCommandAPDU(opencard.core.terminal.CommandAPDU commandAPDU)
Sends an APDU to the applet to which this proxy belongs. |
protected opencard.core.terminal.ResponseAPDU |
sendVerifiedAPDU(opencard.core.service.CardChannel channel,
opencard.core.terminal.CommandAPDU verificationAPDU,
opencard.core.terminal.CHVControl chvControl,
int timeout)
Send a verify CHV command APDU to the card after filling in the
password obtained from the CHV dialog currently associated with
this card service. |
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 |
AppletProxy
public AppletProxy()
getAppletID
public AppletID getAppletID()
- Gets the application identifier of the applet to which this proxy belongs.
- Returns:
- The application identifier of the associated applet.
initialize
protected void initialize(AppletID appletID,
opencard.core.service.CardServiceScheduler scheduler,
opencard.core.service.SmartCard card,
boolean blocking)
throws opencard.core.service.CardServiceException
- Instantiate an AppletProxy and associates it with the card
applet with the given application identifier.
- Parameters:
appletID
- The application identifier of the applet to be
associated with the new AppletProxy.scheduler
- The scheduler of this CardService.card
- The controlling SmartCard object.blocking
- Specify the wait behavior for obtaining a
CardChannel from the CardServiceScheduler.
sendCommandAPDU
protected opencard.core.terminal.ResponseAPDU sendCommandAPDU(opencard.core.service.CardChannel channel,
opencard.core.terminal.CommandAPDU commandAPDU)
throws opencard.core.terminal.CardTerminalException,
opencard.core.service.CardServiceException
- Sends an APDU to the applet to which this proxy belongs, using the given channel.
- Parameters:
channel
- The CardChannel to be used for sending the
command APDU to the card.commandAPDU
- The CommandAPDU to be sent.- Returns:
- The cards response to the command APDU sent.
sendCommandAPDU
public opencard.core.terminal.ResponseAPDU sendCommandAPDU(opencard.core.terminal.CommandAPDU commandAPDU)
throws opencard.core.terminal.CardTerminalException,
opencard.core.service.CardServiceException
- Sends an APDU to the applet to which this proxy belongs.
- Parameters:
commandAPDU
- The CommandAPDU to be sent to the applet- Returns:
- The ResponseAPDU returned by the applet.
sendVerifiedAPDU
protected opencard.core.terminal.ResponseAPDU sendVerifiedAPDU(opencard.core.service.CardChannel channel,
opencard.core.terminal.CommandAPDU verificationAPDU,
opencard.core.terminal.CHVControl chvControl,
int timeout)
throws opencard.core.service.CardServiceException,
opencard.core.terminal.CardTerminalException
- Send a verify CHV command APDU to the card after filling in the
password obtained from the CHV dialog currently associated with
this card service.
- Parameters:
channel
- The CardChannel to be used
for sending the command APDU.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.- Returns:
- The response APDU returned by the card as response to the
verify password command.