Smart Card Solution
User Manual
- R502 Manual
JavaCard API Samples
- Algorithm
Java Card Specification
Knowledge Sharing
Smart Card Solution
User Manual
JavaCard API Samples
Java Card Specification
Knowledge Sharing
The processCommand method of the RMIService class is invoked by the applet to process an incoming RMI message. RMIService collaborates with other services by using the common service format (CSF) in the APDU buffer. It processes only the incoming Java Card RMI APDU commands and produces output as described in the previous sections.
When called with a SELECT FILE command with format described in Section 8.4.1, SELECT FILE Command, this method builds a response APDU as described in that section.
When called with an INVOKE command with the format described in Section 8.4.2, INVOKE Command, this method must call the specified remote method of the identified remote object with the specified parameters. It must catch all exceptions thrown by the remote method. When an exception is caught or the remote method returns, this method must build a response APDU in the format described in Section 8.4.2, INVOKE Command.
Prior to invoking the remote method, the following errors must be detected and must result in an error response in the format described in Section 8.3.5.3, Error Response Encoding:
In addition, upon return from the remote method, the following errors must be detected and must result in an error response in the format described in Section 8.3.5.3, Error Response Encoding:
In addition, the object access firewall rules must be enforced in a manner similar to that of the invokevirtual instruction ( Section 6.2.8.4, Accessing Class Instance Object Methods) by this method when a remote method is invoked. Only methods of a remote object owned by the context of the currently selected applet may be invoked.
Because array parameters to remote methods are transmitted by value, array objects need to be allocated on the card when a remote method with array arguments is invoked via the INVOKE command. Global array objects ( Section 6.2.2, Global Arrays) must be used for incoming remote method arguments. Global arrays have the following properties:
The implementation may choose to maintain the data portion of these global array objects used for remote method parameters in the APDU buffer itself.
Copyright © 2005, Sun Microsystems, Inc. All Rights Reserved.