JavacardOS will not accept order any more, please contact our partner Feitian online Store:
https://ftsafe.en.alibaba.com/index.html

Difference between normal applet and remote applet in Java Card?

JavaCard Applet Development Related Questions and Answers.
Charlotte
Posts: 1
Joined: Mon Feb 18, 2019 5:31 am
Points :10
Contact:

Difference between normal applet and remote applet in Java Card?

Post by Charlotte » Mon Feb 18, 2019 5:37 am

What's the difference between normal applet and remote applet in Java Card?
Is there some demo for the remote applet?

User avatar
Tolice
Posts: 40
Joined: Wed May 20, 2015 2:41 am
Points :254
Contact:

Re: Difference between normal applet and remote applet in Java Card?

Post by Tolice » Thu Feb 21, 2019 1:17 am

Java.rmi defines the Remote interface and RemoteException classes. It includes support for Remote Method Invocation (RMI) to simplify migration and integration with devices using Java Card technology.

To call Remote Interface, the first step in creating a remote service is to define its visible behavior. The remote interfaces define the services your applet provides. As in standard J2SE RMI, all Java Card RMI remote interfaces must extend the java.rmi.Remote interface. To illustrate, here is a remote interface that exposes a method to get the balance stored in the card:

Code: Select all

    import java.rmi.*;
    import javacard.framework.*;

    public interface MyRemoteInterface extends Remote {
        ...  
        public short getBalance() throws RemoteException;
        ...
        // A complete credit card application would also define other  
        // methods such as credit() and debit() methods.
        ...
    }
MyRemoteInterface defines the remote methods, in our example a getBalance() method, to retrieve the balance that is stored in the smart card. Note that except for the Java Card-specific imports, this remote interface looks exactly like a standard RMI remote interface.

Post Reply Previous topicNext topic

Who is online

Users browsing this forum: Google [Bot] and 45 guests

JavaCard OS : Disclaimer