|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.rmi.server.RemoteObject | +--java.rmi.server.RemoteServer | +--java.rmi.server.UnicastRemoteObject | +--cscie160.project.Client
By David Cheung
CSCIE160 Project
DUE 05-16-2001
Client class implements ATMListener so that it will do callbacks as required from the project spec.
This also performs the registration to the ATM.
in Main:
Client first contact ATMFactory instance.
Second, register itself to the ATM. The ATM provides methods to store the remote object in a vector.
Finally, perform the tests required in project spec.
Fields inherited from class java.rmi.server.RemoteObject |
ref |
Constructor Summary | |
Client()
constructor: |
Method Summary | |
static AccountInfo |
getAccountInfo(int acctNum,
int acctPin)
creates an AccountInfo based on acctnum and pin and then returns it. |
void |
getNotify(TransactionNotification noteBox)
Then this function is called, it will print out messages from ATM. |
static void |
main(java.lang.String[] args)
main: |
static void |
performTestEight(ATM atm)
|
static void |
performTestFive(ATM atm)
|
static void |
performTestFour(ATM atm)
|
static void |
performTestNine(ATM atm)
|
static void |
performTestOne(ATM atm)
|
static void |
performTestSeven(ATM atm)
|
static void |
performTestSix(ATM atm)
|
static void |
performTestThree(ATM atm)
|
static void |
performTestTwo(ATM atm)
|
static void |
printBalances(ATM atm)
|
void |
registerMe(ATM atmA)
registers itself to the list of callbacks. |
static void |
testATM(ATM atm)
|
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 |
public Client() throws java.rmi.RemoteException
need to call super() for RMI objects.
Method Detail |
public void getNotify(TransactionNotification noteBox) throws java.rmi.RemoteException
getNotify
in interface ATMListener
public void registerMe(ATM atmA)
public static AccountInfo getAccountInfo(int acctNum, int acctPin)
public static void main(java.lang.String[] args)
1) call ATM class.
2) lookup ATM factory.
3) use getATM from ATMfactory and stores it.
4) Register itself to ATM.
5) Perform tests.
public static void testATM(ATM atm)
public static void printBalances(ATM atm)
public static void performTestOne(ATM atm)
public static void performTestTwo(ATM atm)
public static void performTestThree(ATM atm)
public static void performTestFour(ATM atm)
public static void performTestFive(ATM atm)
public static void performTestSix(ATM atm)
public static void performTestSeven(ATM atm)
public static void performTestEight(ATM atm)
public static void performTestNine(ATM atm)
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |