cscie160.project.bank
Class BankImpl

java.lang.Object
  |
  +--java.rmi.server.RemoteObject
        |
        +--java.rmi.server.RemoteServer
              |
              +--java.rmi.server.UnicastRemoteObject
                    |
                    +--cscie160.project.bank.BankImpl
All Implemented Interfaces:
Bank, java.rmi.Remote, java.io.Serializable

public class BankImpl
extends java.rmi.server.UnicastRemoteObject
implements Bank

By David Cheung

CSCIE160 Project

05-16-2001

BankImpl class:

Implementes Bank interface.

This class is important for Account store house.

Used to create and retrieve accounts.

The functions are called by ATM.

See Also:
Serialized Form

Fields inherited from class java.rmi.server.RemoteObject
ref
 
Constructor Summary
BankImpl()
          the contructor does the following:
 
Method Summary
 void createAccount(int accountNum, int initBalance)
          Creates account based on accountNumber and initial balance
 Account getAccount(int acctNum)
          this does not do security check ie, require AccountInfo object because that is already checked by the security object.
 
Methods inherited from class java.rmi.server.UnicastRemoteObject
clone, exportObject, exportObject, exportObject, unexportObject
 
Methods inherited from class java.rmi.server.RemoteServer
getClientHost, getLog, setLog
 
Methods inherited from class java.rmi.server.RemoteObject
equals, getRef, hashCode, toString, toStub
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BankImpl

public BankImpl()
         throws java.rmi.RemoteException
the contructor does the following:

call super()

initialize hashtable

creates the 3 accounts required in project spec.

Method Detail

getAccount

public Account getAccount(int acctNum)
                   throws java.rmi.RemoteException
this does not do security check ie, require AccountInfo object because that is already checked by the security object. So, it is the ATM's responsibility to check the validity of an account.
Specified by:
getAccount in interface Bank

createAccount

public void createAccount(int accountNum,
                          int initBalance)
Creates account based on accountNumber and initial balance