com.licel.jcardsim.samples.odSample.packageB
Class B

java.lang.Object
  extended by javacard.framework.Applet
      extended by com.licel.jcardsim.samples.odSample.packageB.B
All Implemented Interfaces:
AppletEvent, Shareable

public class B
extends Applet
implements Shareable, AppletEvent

package AID - 0xA0 0x00 0x00 0x00 0x62 0x03 0x01 0x0C 0x07 0x02 applet AID - 0xA0 0x00 0x00 0x00 0x62 0x03 0x01 0x0C 0x07 0x02 0x01 Applet used to demonstrate applet deletion and package deletion. It also demonstrates dependencies by sharing references to objects and shearable references across packages


Method Summary
 Shareable getShareableInterfaceObject(AID client_aid, byte param)
          method returns pointer to this instance, ignores the param
static void install(byte[] bArr, short bOffset, byte bLength)
          method instantiates aninstance of B passing the arguments
 void process(APDU apdu)
          method processes the APDU commands passed to this applet instance.
 void resetReference()
          method resets reference in bRef field to null.
 void setReference(B b)
          method sets reference in bRef field to input parameter B object.
 void uninstall()
          uninstall method called before applet deletion
 
Methods inherited from class javacard.framework.Applet
deselect, register, register, select, selectingApplet
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

install

public static void install(byte[] bArr,
                           short bOffset,
                           byte bLength)
method instantiates aninstance of B passing the arguments


getShareableInterfaceObject

public Shareable getShareableInterfaceObject(AID client_aid,
                                             byte param)
method returns pointer to this instance, ignores the param

Overrides:
getShareableInterfaceObject in class Applet
Parameters:
client_aid - the AID object of the client applet
param - optional parameter byte. The parameter byte may be used by the client to specify which shareable interface object is being requested.
Returns:
the shareable interface object or null

process

public void process(APDU apdu)
             throws ISOException
method processes the APDU commands passed to this applet instance. It only accepts the SELECT and SETUP dependency(0x12) commands.

Specified by:
process in class Applet
Parameters:
apdu - the incoming APDU object
Throws:
ISOException - with the response bytes per ISO 7816-4
See Also:
APDU

setReference

public void setReference(B b)
method sets reference in bRef field to input parameter B object. This is used for applet dependency and uninstall demonstration


resetReference

public void resetReference()
method resets reference in bRef field to null. This is called to remove applet dependency


uninstall

public void uninstall()
uninstall method called before applet deletion

Specified by:
uninstall in interface AppletEvent