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.
-
bankAddress
-
-
log
-
-
NetworkToBank(Log, InetAddress)
- Constructor
-
closeConnection()
- Close connection to bank at system shutdown
-
openConnection()
- Open connection to bank at system startup
-
sendMessage(Message, Balances)
- Send a message to bank
log
private Log log
bankAddress
private InetAddress bankAddress
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
openConnection
public void openConnection()
- Open connection to bank at system startup
closeConnection
public void closeConnection()
- Close connection to bank at system shutdown
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