IntelliJ Java IDE
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Public Interfaces for the Data Client and Data Class: Clarification Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Professional Certification » Developer Certification (SCJD/OCMJD)
Reply Bookmark "Public Interfaces for the Data Client and Data Class: Clarification" Watch "Public Interfaces for the Data Client and Data Class: Clarification" New topic
Author

Public Interfaces for the Data Client and Data Class: Clarification

Stuart Bell
Greenhorn

Joined: May 29, 2001
Posts: 4
Hi All,

In the Fly By Night specification (when describing writing the Data Client class) it requires the following:
"This implementation should include a class that implements the same public methods as the suncertify.db.Data class"
It doesn't seem right that the Data Client should have methods such as lock()/unlock()/close() or does it?? Can someone explain their thoughts on this one please?? It would be much appreciated as this is one of those vague areas.
Thanks for your time,

Stuart Bell
Rick Fortier
Ranch Hand

Joined: Jun 04, 2001
Posts: 147
Originally posted by Stuart Bell:
Hi All,

In the Fly By Night specification (when describing writing the Data Client class) it requires the following:
"This implementation should include a class that implements the same public methods as the suncertify.db.Data class"
It doesn't seem right that the Data Client should have methods such as lock()/unlock()/close() or does it?? Can someone explain their thoughts on this one please?? It would be much appreciated as this is one of those vague areas.
Thanks for your time,

Stuart Bell

If it is thier requirement, you must treat it as such. It did not however say that you must implement the lock/unlock in the Data class.
I think most people have created an interface which contains all of the public classes. As in any interface, you can choose which to implement and which to have stubs only.
My Data class does not implement lock and unlock, I have created a LockManager class which implements them. Since lock and unlock are not necessary in local mode I dont think that they should be in Data.
For the server, I have a class called FBNServer which serves as a pass through to my Data and LockManager classes.
For the client, I have a FlightServices class which goes between the GUI and Data classes. It follows the factory pattern and will instantiate different classes depending on whether I am in local or remote mode. It has methods such as BookFlight(), etc..
The GUI class does not know about lock() and unlock(), FlightServces does.
 
 
subject: Public Interfaces for the Data Client and Data Class: Clarification
 
Threads others viewed
The remote client code that you write must provide all the public methods of the sunc
Clarification of the requirements
Primitive type
RMI client implementing Data class methods???
clarify this pls
developer file tools