Designing RMI Applications
//One instance of Bank for all clients class Bank { public Money getBalance(Account account) throws RemoteException; public void makeDeposit(Account account) throws RemoteException, NegativeAmountException; public void makeWithdrawal(Account account, Money amount) throws RemoteException, OverdraftException, NegativeAmountException; } //One instance of Account for each account class Account { public Money getBalance() throws RemoteException; public void makeDeposit(Money amount) throws RemoteException, NegativeAmountException; public void makeWithdrawal(Money amount) throws RemoteException, OverdraftException, NegativeAmountException; }
3 of 49