All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class atm.physical.NetworkToBank

java.lang.Object
   |
   +----atm.physical.NetworkToBank

public class NetworkToBank
extends Object
Manager for the ATM's network connection. In a real ATM, this would manage a physical device; in this simulation, it uses classes in package simulation to simulate the device.


Variable Index

 o bankAddress
 o log

Constructor Index

 o NetworkToBank(Log, InetAddress)
Constructor

Method Index

 o closeConnection()
Close connection to bank at system shutdown
 o openConnection()
Open connection to bank at system startup
 o sendMessage(Message, Balances)
Send a message to bank

Variables

 o log
 private Log log
 o bankAddress
 private InetAddress bankAddress

Constructors

 o NetworkToBank
 public NetworkToBank(Log log,
                      InetAddress bankAddress)
Constructor

Parameters:
log - the log in which to record sending of messages and responses
bankAddress - the network address of the bank

Methods

 o openConnection
 public void openConnection()
Open connection to bank at system startup

 o closeConnection
 public void closeConnection()
Close connection to bank at system shutdown

 o sendMessage
 public Status sendMessage(Message message,
                           Balances balances)
Send a message to bank

Parameters:
message - the message to send
balances - (out) balances in customer's account as reported by bank
Returns:
status code returned by bank

All Packages  Class Hierarchy  This Package  Previous  Next  Index