|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.etill.kitcashcassette.KitCashMessageWrapper
Constructor Summary | |
---|---|
KitCashMessageWrapper(java.lang.String receiver,
java.lang.String senderID,
KitCashException error)
Constructs a new KitCashMessageWrapper object containing a KitCash error message. |
|
KitCashMessageWrapper(java.lang.String receiver,
java.lang.String senderID,
KitCashMessage contents)
Constructs a new KitCashMessageWrapper object containing the KitCash protocol message. |
Method Summary | |
---|---|
int |
getAmount()
Returns the cash transfer amount from the message wrapper |
KitCashMessage |
getContents()
Returns the KitCash message inside this wrapper |
KitCashException |
getError()
Returns the KitCash error message inside this wrapper |
java.lang.String |
getReceiver()
Returns the ID of the receiver of the message |
KitCashMessageWrapper |
getResponse(java.lang.String host,
int port)
Wraps the message or error message in a MIME message, sends it to the specified port and returns the response message. |
java.lang.String |
getSenderID()
Returns the ID of the sender of the message as designated by the receiver. |
static KitCashMessageWrapper |
readMessage(java.io.InputStream is)
Reads a MIME message from the input stream and returns the KitCashMessage contained in that stream. |
void |
setAmount(int amount)
Sets the amount of the cash transfer in the message wrapper. |
java.lang.String |
toString()
Returns a string representation of the KitCashMessageWrapper . |
void |
writeMessage(java.io.OutputStream os)
Wraps the KitCash protocol message in a MIME message and writes it to the given output stream. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public KitCashMessageWrapper(java.lang.String receiver, java.lang.String senderID, KitCashException error)
KitCashMessageWrapper
object containing a KitCash error message.error
- the error message to be sentreceiver
- the receiver of the messagesenderID
- the receiver's ID for the sender (e.g. order number or account number)public KitCashMessageWrapper(java.lang.String receiver, java.lang.String senderID, KitCashMessage contents)
KitCashMessageWrapper
object containing the KitCash protocol message.contents
- the KitCash protocol messagereceiver
- the receiver of the messagesenderID
- the receiver's ID for the sender (e.g. order number or account number)Method Detail |
public int getAmount()
public KitCashMessage getContents()
public KitCashException getError()
public java.lang.String getReceiver()
public KitCashMessageWrapper getResponse(java.lang.String host, int port) throws java.io.IOException
host
- the hostname of the receiverport
- the port number of the receiverjava.io.IOException
- if the communication failspublic java.lang.String getSenderID()
When sending a KitCash message from consumer to merchant, this should be the order number. When sending a KitCash message from merchant to bank, this should be the account number.
public static KitCashMessageWrapper readMessage(java.io.InputStream is) throws java.io.IOException
is
- the input stream from which to read the MIME messagejava.io.IOException
- if the communication failspublic void setAmount(int amount)
amount
- the amount to transferpublic java.lang.String toString()
KitCashMessageWrapper
.toString
in class java.lang.Object
KitCashMessageWrapper
public void writeMessage(java.io.OutputStream os) throws java.io.IOException
os
- the output stream to which to write the messagejava.io.IOException
- if the communication fails
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |