|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.etill.kitcashcassette.KitCashConnection
A KitCashConnection
instance is created every time a consumer's wallet opens
a socket on a KitCashComPoint
's server socket. The KitCashConnection
object is passed by the Payment Manager framework to the cassette (using the
KitCashCassette.service(protocolRequest, protocolResponse)
method.
The cassette can then use this Connection
object to read and write messages
to and from the consumer's wallet.
Most of the actual reading and writing of KitCash protocol messages is handled by the
KitCashMessageWrapper
class.
KitCashMessageWrapper
,
KitCashComPoint.establishConnection()
,
com.ibm.etill.kitcashcassette.KitCashCassette#service(ProtocolRequest, ProtocolResponse)
Constructor Summary | |
---|---|
KitCashConnection(java.net.Socket socket)
Constructs a new socket connection between wallet and cassette. |
Method Summary | |
---|---|
void |
closeConnection()
Closes the socket associated with this object. |
java.lang.Object |
read()
Reads the next KitCashMessageWrapper received at the KitCashComPoint. |
void |
setConnection(java.lang.Object o)
Deprecated. not required by cassette developers |
java.lang.String |
toString()
Returns a string representation of the KitCashConnection object. |
java.lang.Object |
write(java.lang.Object message)
Writes the KitCashMessage parameter to the KitCashComPoint. |
void |
writeErrorResponse(KitCashException kce)
Writes the KitCashException parameter to the KitCashComPoint. |
java.lang.Object |
writeErrorResponse(java.lang.Object message)
Deprecated. cassette developers should define their own error response methods (if required) |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public KitCashConnection(java.net.Socket socket)
socket
- the socket used by the KitCashComPointMethod Detail |
public void closeConnection() throws java.io.IOException
closeConnection
in interface com.ibm.etill.framework.io.ETillConnection
java.io.IOException
- if the operation failspublic java.lang.Object read() throws java.io.IOException
read
in interface com.ibm.etill.framework.io.ETillConnection
java.io.IOException
- if the operation failsKitCashMessageWrapper.readMessage(java.io.InputStream)
public void setConnection(java.lang.Object o)
setConnection
in interface com.ibm.etill.framework.io.ETillConnection
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.Object write(java.lang.Object message) throws java.io.IOException
write
in interface com.ibm.etill.framework.io.ETillConnection
message
- the KitCashMessage to be sentjava.io.IOException
- if the operation failsKitCashMessageWrapper
,
KitCashMessage
public void writeErrorResponse(KitCashException kce) throws java.io.IOException
kce
- the KitCashException to be sentjava.io.IOException
- if the operation failsKitCashException
,
KitCashMessageWrapper
public java.lang.Object writeErrorResponse(java.lang.Object message) throws java.io.IOException
writeErrorResponse
in interface com.ibm.etill.framework.io.ETillConnection
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |