This is the result of my searching about SIO :
Shareable interfaces are a feature in the Java Card API to enable applet interaction.To the owning context, the SIO is a normal object whose fields and methods can be accessed. To any other context, the SIO is an instance of the shareable interface, and only the methods defined in the shareable interface are accessible. All other fields and methods of the SIO are protected by the firewall.
Shareable interfaces provide a secure mechanism for inter-applet communication, as follows:
Server applet A builds a Shareable Interface Object
To make an object available for sharing with another applet in a different context, applet A first defines a shareable interface, SI. A shareable interface extends the interface javacard.framework.Shareable. The methods defined in the shareable interface, SI, represent the services that applet A makes accessible to other applets.
Applet A then defines a class C that implements the shareable interface SI. C implements the methods defined in SI. C may also define other methods and fields, but these are protected by the applet firewall. Only the methods defined in SI are accessible to other applets.
Applet A creates an object instance O of class C. O belongs to applet A, and the firewall allows A to access any of the fields and methods of O.
Client applet B obtains the Shareable Interface Object
Applet B can request service from applet A by invoking one of the shareable interface methods of SIO. During the invocation the Java Card VM performs a context switch. The original currently active context (B) is saved on a stack and the context of the owner (A) of the actual object (O) becomes the new currently active context. A’s implementation of the shareable interface method (SI method) executes in A’s context.
The SI method can find out the AID of its client (B) via the JCSystem.getPreviousContextAID method. The method determines whether or not it will perform the service for applet B.
Because of the context switch, the firewall allows the SI method to access all the fields and methods of object O and any other object in the context of A. At the same time, the firewall prevents the method from accessing non-shared objects in the context of B.
The SI method can access the parameters passed by B and can provide a return value to B.
During the return, the Java Card VM performs a restoring context switch. The original currently active context (B) is popped from the stack, and again becomes the currently active context.
Because of the context switch, the firewall again allows B to access any of its objects and prevents B from accessing non-shared objects in the context of A.