Processing the Incoming Commands

Processing incoming commands is entirely delegated to the Java Card RMI service, which knows how to handle all the incoming requests. The service also implements a default behavior for the handling of any request that it does not recognize. In Java Card RMI, the following kinds of requests can be handled:

  • Selection request — The service responds by sending its initial remote reference

  • Method invocation request — The service responds by performing the actual method invocation and returning the result

To perform these actions, the service needs privileged access to some resources that are owned by the Java Card RE (in particular, privileged access is needed to perform the method invocation). The applet delegates processing to the Java Card RMI service from its process method as follows:

dispatcher.process(apdu);