Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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.3 2000/01/14 09:32:26 damke Exp $
Author:
  Thomas Schaeck (schaeck@de.ibm.com)

Constructor Summary
`AppletProxy()`

Method Summary
`AppletID` | `getAppletID()` Gets the application identifier of the applet to which this proxy belongs.
`protected void` | `initialize(AppletID appletID, CardServiceScheduler scheduler, SmartCard card, boolean blocking)` Instantiate an `AppletProxy` and associates it with the card applet with the given application identifier.
`protected ResponseAPDU` | `sendCommandAPDU(CardChannel channel, CommandAPDU commandAPDU)` Sends an APDU to the applet to which this proxy belongs, using the given channel.
`ResponseAPDU` | `sendCommandAPDU(CommandAPDU commandAPDU)` Sends an APDU to the applet to which this proxy belongs.
`protected ResponseAPDU` | `sendVerifiedAPDU(CardChannel channel, CommandAPDU verificationAPDU, 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.opt.applet.BasicAppletCardService
`getAppletSelector, getCardState, initialize, sendCommandAPDU, sendCommandAPDU, sendVerifiedAPDU, setAppletSelector`

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

### AppletProxy

    public AppletProxy()

Method Detail

### 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`.
  Throws:
    `CardServiceException`

### sendCommandAPDU

    protected 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.
  Throws:
    `CardTerminalException`
    `CardServiceException`

### 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.
  Throws:
    `CardTerminalException`
    `CardServiceException`

### sendVerifiedAPDU

    protected 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.
  Throws:
    `CardServiceException`
    `CardTerminalException`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD