FileDocCategorySizeDatePackage
SecurePurseApplet.javaAPI DocJava Card1278Wed Mar 22 21:07:22 GMT 2006com.sun.javacard.samples.SecureRMIDemo

SecurePurseApplet

public class SecurePurseApplet extends javacard.framework.Applet

Fields Summary
private Dispatcher
disp
Constructors Summary
public SecurePurseApplet()



        SecurityService sec = new MySecurityService();

        Purse purse = new SecurePurseImpl(sec);
        
        RemoteService rmi = new RMIService(purse);
        
        disp = new Dispatcher( (short) 4);
        disp.addService(sec, Dispatcher.PROCESS_INPUT_DATA);
        disp.addService(sec, Dispatcher.PROCESS_COMMAND);
        disp.addService(rmi, Dispatcher.PROCESS_COMMAND);
        disp.addService(sec, Dispatcher.PROCESS_OUTPUT_DATA);
        
        register();
    
Methods Summary
public static voidinstall(byte[] aid, short s, byte b)

        new SecurePurseApplet();
    
public voidprocess(javacard.framework.APDU apdu)

        
        disp.process(apdu);