com.ibm.etill.kitcashcassette
Class KitCashComPoint

java.lang.Object
  |
  +--com.ibm.etill.framework.io.ServerSocketComPoint
        |
        +--com.ibm.etill.kitcashcassette.KitCashComPoint
All Implemented Interfaces:
com.ibm.etill.framework.io.ComPoint

public class KitCashComPoint
extends com.ibm.etill.framework.io.ServerSocketComPoint

ComPoints are objects that the Payment Manager framework uses to receive input and to send output back out. A ServerSocketComPoint is a specialized type of ComPoint that uses a server socket to communicate. During the start-up of Payment Manager, the framework creates protocol threads for each cassette. Each of these protocol threads has a single ComPoint instance that it uses for communication.

Pseudo-code for the protocol thread is as follows:

  comPoint = new cassette specific ComPoint
  do forever
    eTillDataStream = comPoint.establishConnection()
    protocolRequest = new cassette specific protocol request created from eTillDataStream
    protocolResponse = new cassette specific protocol response created from eTillDataStream
    cassette.service(protocolRequest, protocolResponse)
  end do
 

KitCashComPoint is a simple derived class of ServerSocketComPoint. It waits for socket connections (in establishConnection()) and returns a KitCashConnection object to the Payment Manager framework.

See Also:
KitCashConnection

Fields inherited from interface com.ibm.etill.framework.io.ComPoint
COMPOINT_CLOSED, COMPOINT_OPEN
 
Constructor Summary
KitCashComPoint(int port)
          Constructs a new KitCashComPoint object.
 
Method Summary
 com.ibm.etill.framework.io.ETillConnection establishConnection()
          Wait for a KitCash wallet socket connection to be estalished.
 
Methods inherited from class com.ibm.etill.framework.io.ServerSocketComPoint
accept, close, getClassName, getLock, getPort, getServerSocket, getStatus, getTimeOut, open, setClassName, setLock, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

KitCashComPoint

public KitCashComPoint(int port)
Constructs a new KitCashComPoint object.
Parameters:
port - the port on which to send and receive KitCash messages from the consumer
Method Detail

establishConnection

public com.ibm.etill.framework.io.ETillConnection establishConnection()
                                                               throws java.io.IOException
Wait for a KitCash wallet socket connection to be estalished.
Overrides:
establishConnection in class com.ibm.etill.framework.io.ServerSocketComPoint
Returns:
a KitCashConnection object
See Also:
KitCashConnection