|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavacard.framework.Applet
com.licel.jcardsim.samples.JavaLoyalty.JavaLoyalty
public class JavaLoyalty
Minimalistic loyalty applet. JavaPurse uses grantPoints method implementing JavaLoyaltyInterface to grant loyalty points. JavaLoyalty can process only two command APDUs: READ_BALANCE and RESET_BALANCE.
Constructor Summary | |
---|---|
protected |
JavaLoyalty(byte[] bArray,
short bOffset,
byte bLength)
Performs memory allocations, initializations, and applet registration |
Method Summary | |
---|---|
Shareable |
getShareableInterfaceObject(AID clientAID,
byte parameter)
Implements getShareableInterfaceObject method of Applet class. |
void |
grantPoints(byte[] buffer)
Implements main interaction with a client. |
static void |
install(byte[] bArray,
short bOffset,
byte bLength)
Installs Java Loyalty applet. |
void |
process(APDU apdu)
Dispatches APDU commands. |
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 |
Constructor Detail |
---|
protected JavaLoyalty(byte[] bArray, short bOffset, byte bLength)
bArray
- received by install.bOffset
- received by install.bLength
- received by install.Method Detail |
---|
public static void install(byte[] bArray, short bOffset, byte bLength)
bArray
- install parameter array.bOffset
- where install data begins.bLength
- install parameter data length.public Shareable getShareableInterfaceObject(AID clientAID, byte parameter)
JavaLoyalty could check here if the clientAID is that of JavaPurse Checking of the parameter to be agreed upon value provides additional security, or, if the Shareable Interface Object weren't JavaLoyalty itself it could return different Shareable Interface Objects for different values of clientAID and/or parameter.
SeeJava Card Runtime Environment (JCRE) Specification for details.
getShareableInterfaceObject
in class Applet
clientAID
- AID of the clientparameter
- additional parameter
public void grantPoints(byte[] buffer)
grantPoints
in interface JavaLoyaltyInterface
buffer
- APDU bufferpublic void process(APDU apdu)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |