|
|||||||||
| 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
|
+--taxisrus.implementation.rmi.ModelRMI
| Field Summary | |
protected ModelInterface |
_model
|
protected Object |
_returnObject
|
| Fields inherited from class java.rmi.server.RemoteObject |
ref |
| Constructor Summary | |
ModelRMI()
For test reasons. |
|
ModelRMI(String modelServerName)
|
|
| Method Summary | |
Object |
addCustomer(Customer customer)
Adds a customer in system. PRECONDITION: Customer must have the following information set already: - call-in time - pickup address - pickup time - destination address POSTCONDITION: customer's information is set scheduler now has customer within domain datastore knows of ride request |
Object |
cancelCustomer(String customerPhone,
String customerLastName,
String customerFirstName)
Cancel the customer, returns true for successful cancellation |
Object |
changeCustomer(Customer oldCustomer,
Customer newCustomer)
Change a customer |
Object |
getCustomer(String customerPhone,
String customerLastName,
String customerFirstName)
Returns the Customer identified by the phone number and last name PRECONDITION: scheduler contains the target customer POSTCONDITION: none |
ManagerReport |
getReport(int typeOfReport,
int specificity,
int timeInterval)
For ManagerUI: Given an enumerated type of report, this method will return a Report designed for a manager of the cab company |
ManagerReport |
getReport(int typeOfReport,
int specificity,
int timeInterval,
Date from,
Date to)
Passes ManagerReport request from ManagerUI to DataStore Given an enumerated type of report, this method will return a Report designed for a manager of the cab company |
boolean |
isCreditCardAccepted(double chargedAmount,
String creditCardNumber)
"Approve" credit card -- passes the charge amount and creditCardNumber to bank and sees if the card is approved PRECONDITION: none POSTCONDITION: none |
static void |
main(String[] args)
|
Boolean |
registerCabToModel(CabConsoleInterface cabConsole,
int cab_id,
int driver_id,
String gps)
registers the cab in the model if cab_id and driver_id are valid (in database) PRECONDITION: both cab and driver identified by cab_id and driver_id registers for the first time. POSTCONDITION: a cab object corresponding to the cab console has been created and placed in its respective zone in the model |
boolean |
updateModelCabInfo(String cust_info)
For Cab Console: After console updates referenced cab object, this method triggers necessary model updates |
| 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 |
| Field Detail |
protected ModelInterface _model
protected Object _returnObject
| Constructor Detail |
public ModelRMI(String modelServerName)
throws RemoteException
public ModelRMI()
throws RemoteException
| Method Detail |
public Object addCustomer(Customer customer)
throws RemoteException
ModelRMIInterfaceaddCustomer in interface ModelRMIInterfacetaxisrus.publicinterface.ModelRMIInterfacecustomer - customer object to be added
public Object cancelCustomer(String customerPhone,
String customerLastName,
String customerFirstName)
throws RemoteException
ModelRMIInterfacecancelCustomer in interface ModelRMIInterfacetaxisrus.publicinterface.ModelRMIInterfacecustomer_id - customerLastName -
public Object getCustomer(String customerPhone,
String customerLastName,
String customerFirstName)
throws RemoteException
ModelRMIInterfacegetCustomer in interface ModelRMIInterfacetaxisrus.publicinterface.ModelRMIInterfacecustomerPhone - customerLastName -
public Object changeCustomer(Customer oldCustomer,
Customer newCustomer)
throws RemoteException
changeCustomer in interface ModelRMIInterfaceold - customernew - customerpublic static void main(String[] args)
public boolean updateModelCabInfo(String cust_info)
updateModelCabInfo in interface ModelRMIInterfacetaxisrus.publicinterface.ModelRMIInterfacemust - be in this format:
public Boolean registerCabToModel(CabConsoleInterface cabConsole,
int cab_id,
int driver_id,
String gps)
ModelRMIInterfaceregisterCabToModel in interface ModelRMIInterfacetaxisrus.publicinterface.ModelRMIInterface
public boolean isCreditCardAccepted(double chargedAmount,
String creditCardNumber)
ModelRMIInterfaceisCreditCardAccepted in interface ModelRMIInterfacetaxisrus.publicinterface.ModelRMIInterfacechargedAmount - amount to chargecreditCardNumber - credit card number
public ManagerReport getReport(int typeOfReport,
int specificity,
int timeInterval)
ModelRMIInterfacegetReport in interface ModelRMIInterfacetaxisrus.publicinterface.ModelRMIInterfacetypeOfReport - specificity - timeInterval -
public ManagerReport getReport(int typeOfReport,
int specificity,
int timeInterval,
Date from,
Date to)
ModelRMIInterfacegetReport in interface ModelRMIInterfacetaxisrus.publicinterface.ModelRMIInterfacetypeOfReport - - type of reportspecificity - timeInterval - from - - starting date for queryto - - ending date for query
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||