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
- Version:
- $Id: AppletProxy.java,v 1.1 1999/11/02 18:06:44 damke Exp $
| 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,
CardServiceScheduler scheduler,
SmartCard card,
boolean blocking)
throws 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
public ResponseAPDU sendCommandAPDU(CardChannel channel,
CommandAPDU commandAPDU)
throws CardTerminalException,
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 ResponseAPDU sendCommandAPDU(CommandAPDU commandAPDU)
throws CardTerminalException,
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
public ResponseAPDU sendVerifiedAPDU(CardChannel channel,
CommandAPDU verificationAPDU,
CHVControl chvControl,
int timeout)
throws CardServiceException,
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.
|