|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecttopdown.service.BankServiceImpl
The is the bank service implementation class. It implements the remote service interface and creates the underlying bank class this service makes available to remote users.
| Field Summary | |
private Bank |
m_bank
The underlying bank instance. |
| Constructor Summary | |
BankServiceImpl()
Creates a bank service instance that wraps a bank object. |
|
| Method Summary | |
java.lang.String |
createAccount(java.lang.String acctName,
float initBalance)
Creates a bank account. |
void |
deposit(java.lang.String acctID,
float amount)
Deposits money into the given account. |
java.lang.String |
getAccountID(java.lang.String acctName)
Returns the account ID associated with the provided account owner's name. |
float |
getBalance(java.lang.String acctID,
java.lang.String acctName)
Returns the current balance of the account. |
void |
withdraw(java.lang.String acctID,
float amount)
Withdraws money from the given account. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private Bank m_bank
| Constructor Detail |
public BankServiceImpl()
| Method Detail |
public java.lang.String createAccount(java.lang.String acctName,
float initBalance)
throws java.rmi.RemoteException,
AccountException
acctName - the name of the account owner.initBalance - the initial balance for the account.
java.rmi.RemoteException - if an unexpected system error occurs.
AccountException - if the initial balance is insufficient (<= 0).
public void deposit(java.lang.String acctID,
float amount)
throws java.rmi.RemoteException,
AccountException
acctID - the ID of the account into which the deposit is made.amount - the amount of money to deposit.
java.rmi.RemoteException - if an unexpected system error occurs.
AccountException - if no account is found for the given account ID.
public void withdraw(java.lang.String acctID,
float amount)
throws java.rmi.RemoteException,
AccountException
acctID - the account ID for the account from which the money will be withdrawn.amount - the amount of money to withdraw.
java.rmi.RemoteException - if an unexpected system error occurs.
AccountException - if the amount of money withdrawn exceeds the maximum amount allowed ($2000.00).
public float getBalance(java.lang.String acctID,
java.lang.String acctName)
throws java.rmi.RemoteException,
AccountException
acctID - the account ID of the account.acctName - the name of the account owner.
java.rmi.RemoteException - if an unexpected system error occurs.
AccountException - if no account is found for the given account ID.
public java.lang.String getAccountID(java.lang.String acctName)
throws java.rmi.RemoteException,
AccountException
acctName - the name of the account owner.
java.rmi.RemoteException - if an unexpected system error occurs.
AccountException - if no account is found for the provided owner name.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||