example.purse
Class PurseImpl

java.lang.Object
  |
  +--javacard.framework.service.CardRemoteObject
        |
        +--example.purse.PurseImpl
All Implemented Interfaces:
Purse, java.rmi.Remote

public class PurseImpl
extends javacard.framework.service.CardRemoteObject
implements Purse


Field Summary
private  short balance
           
static short LIMIT
           
static short NEGATIVE_VALUE
           
static short OVERFLOW
           
static short UNDERFLOW
           
 
Fields inherited from class javacard.framework.service.CardRemoteObject
 
Fields inherited from interface example.purse.Purse
ROLE_ANYBODY, ROLE_BANK, ROLE_MERCHANT, ROLE_OWNER
 
Constructor Summary
PurseImpl()
           
 
Method Summary
 byte[] concatenate(short[] p1, byte[] p2, byte[] p3, byte[] p4)
           
 void decreaseBalance(short amount)
           
 short getBalance()
           
 void increaseBalance(short amount)
           
 
Methods inherited from class javacard.framework.service.CardRemoteObject
export, unexport
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LIMIT

public static final short LIMIT
See Also:
Constant Field Values

NEGATIVE_VALUE

public static final short NEGATIVE_VALUE
See Also:
Constant Field Values

OVERFLOW

public static final short OVERFLOW
See Also:
Constant Field Values

UNDERFLOW

public static final short UNDERFLOW
See Also:
Constant Field Values

balance

private short balance
Constructor Detail

PurseImpl

public PurseImpl()
Method Detail

getBalance

public short getBalance()
                 throws java.rmi.RemoteException
Specified by:
getBalance in interface Purse
java.rmi.RemoteException

increaseBalance

public void increaseBalance(short amount)
                     throws javacard.framework.UserException,
                            java.rmi.RemoteException
Specified by:
increaseBalance in interface Purse
javacard.framework.UserException
java.rmi.RemoteException

decreaseBalance

public void decreaseBalance(short amount)
                     throws javacard.framework.UserException,
                            java.rmi.RemoteException
Specified by:
decreaseBalance in interface Purse
javacard.framework.UserException
java.rmi.RemoteException

concatenate

public byte[] concatenate(short[] p1,
                          byte[] p2,
                          byte[] p3,
                          byte[] p4)
Specified by:
concatenate in interface Purse