|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.etill.kitcashcassette.test.card.KitCashMessage
Field Summary | |
---|---|
static byte |
AMOUNT_REQ
Token for the amount request message: How much do you want. |
static byte |
AMOUNT_RESP
Token for the amount response message: I want zzz. |
static byte |
AUTH_REQ
Token for the authorisation request message: Hello I'm xxx. |
static byte |
AUTH_RESP
Token for the authorisation response message: I'm yyy. |
byte |
command
|
static byte |
CONTINUE
Response token from the KitCash card indicating that it expects to receive another message |
static byte |
NO_MSG
Token indicating no message type has been set |
static byte |
PAYMENT
Token for the payment message: Here you are. |
static byte |
PAYMENT_ACCEPTED
Token indicating successful receipt of payment |
static byte |
PAYMENT_REJECTED
Token indicating unsuccessful receipt of payment |
static byte |
PAYMENT_RESP
Token for the payment response message: Thanks. |
static byte |
STOP
Response token from the KitCash card indicating that it expects to receive no more messages |
Constructor Summary | |
---|---|
KitCashMessage(byte[] msg)
Constructs a new KitCashMessage from a byte array. |
Method Summary | |
---|---|
int |
getAmount()
Returns the amount embedded inside the message (only for AMOUNT_RESP messages) |
java.lang.String |
getID()
returns the ID of the sender of the message (only for AUTH_REQ and AUTH_RESP messages) |
byte[] |
getMessage()
Returns the message as a byte array |
boolean |
isComplete()
Returns true if the message should be not sent to the receiver of the cash |
boolean |
toBeForwarded()
Returns true if the message should be sent to the receiver of the cash |
java.lang.String |
toString()
Returns string representation of the KitCash protocol message |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final byte AUTH_REQ
public static final byte AUTH_RESP
public static final byte AMOUNT_REQ
public static final byte AMOUNT_RESP
public static final byte PAYMENT
public static final byte PAYMENT_RESP
public static final byte NO_MSG
public static final byte CONTINUE
public static final byte STOP
public static final byte PAYMENT_ACCEPTED
public static final byte PAYMENT_REJECTED
public byte command
Constructor Detail |
public KitCashMessage(byte[] msg) throws KitCashException
KitCashMessage
from a byte array.KitCashException
- if the byte array is not validMethod Detail |
public int getAmount()
public java.lang.String getID()
public byte[] getMessage()
public boolean isComplete()
public boolean toBeForwarded()
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |