Make your own free website on Tripod.com

suncertify.remoteClient
Class DataClient

java.lang.Object
  |
  +--suncertify.remoteClient.DataClient

public class DataClient
extends java.lang.Object

The DataClient for the FlightByNight Reservation System. It does the connection with the remote server and calls methods remotely. It provides routine to:

Version:
1.0 08/09/1999

Constructor Summary
DataClient(java.lang.String host)
          The Class Constructor which makes a lookup of the remote Objects that represents the database for flights schedules, flights reservation status and reservation details.
 
Method Summary
 java.lang.String[][] bookTickets(java.lang.String[][] travellers, java.lang.String[] flight)
          The method to book tickets on a flight that is chosen.
 boolean cancelReservation(DataInfo reserDet)
          The Method to cancel a reservation.
 java.lang.String[][] findFlights(java.lang.String criteria)
          The method to get the details of the flights which meets the Customers' requirements.
 DataInfo[] findReservations(java.lang.String criteria)
          The method to find out reservations details for inquiry purposes.
 java.lang.String[][] findStatus(java.lang.String criteria)
          The method to check the booking status of a flight on a particular date.
 DataInfo[] getFltsSchedules(java.lang.String criteria)
          The method to get the schedules of flights from the flight schedule master database.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataClient

public DataClient(java.lang.String host)
           throws DataClientException
The Class Constructor which makes a lookup of the remote Objects that represents the database for flights schedules, flights reservation status and reservation details.
Throws:
DataClientException - : If there was any problem while looking up for the remote objects.
Method Detail

getFltsSchedules

public DataInfo[] getFltsSchedules(java.lang.String criteria)
                            throws DataClientException
The method to get the schedules of flights from the flight schedule master database.
Parameters:
criteria - : The query criteria for the flights schedule.
Returns:
DataInfo[] : The list of flight schedules.
Throws:
DataClientException - : If there was a RemoteException while querying with the remote Server.

findFlights

public java.lang.String[][] findFlights(java.lang.String criteria)
                                 throws DataClientException
The method to get the details of the flights which meets the Customers' requirements.
Parameters:
criteria - : The customers' requirements
Returns:
String[][] : Information about all the flights that meet the requirements.
Throws:
DataClientException - : If there was some error in remote communication

bookTickets

public java.lang.String[][] bookTickets(java.lang.String[][] travellers,
                                        java.lang.String[] flight)
                                 throws DataClientException
The method to book tickets on a flight that is chosen.
Parameters:
flight - : all informations about the flight into which booking is to be done.It does not contain the available field.
Returns:
String[][] : represting the reservation key and status
Throws:
DataClientException - : If there was some error in remote communication

findReservations

public DataInfo[] findReservations(java.lang.String criteria)
                            throws DataClientException
The method to find out reservations details for inquiry purposes.
Parameters:
criteria - : condition the reservation detail must meet.
Returns:
DataInfo[] : The reservations details.
Throws:
DataClientException - : If there was a RemoteException or if criteria format is not correct.

cancelReservation

public boolean cancelReservation(DataInfo reserDet)
                          throws DataClientException
The Method to cancel a reservation.
Parameters:
reserDet - : Details about the reservation which is to be cancelled.
Returns:
boolean : true/false : if cancellation was success return true else false.
Throws:
DataClientException - : If there was a RemoteException

findStatus

public java.lang.String[][] findStatus(java.lang.String criteria)
                                throws DataClientException
The method to check the booking status of a flight on a particular date. It has been added for mailnly debugging purposes.