aspose file tools*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Remote client and Data client Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Remote client and Data client" Watch "Remote client and Data client" New topic
Author

Remote client and Data client

Eric Li
Greenhorn

Joined: Nov 06, 2001
Posts: 7
Two questions are confusing me:
1. The remote client code that you write must provide all the public methods of the suncertify.db.Data class.
My understanding is for the local mode, the client will definitely implement all the public methods of suncertify.db.Data. But is this what this remote client refers to?
In network mode, the client will just make the connection with the rmi server and get a server handle and whenever client wants to do something with db on the server side, it just call the server method through the handle. Why should the remote client need to implement all the public methods of Data class? Why should the remote client care since the server already does this for him?
2.
Writing Data Client
To connect with your server, you should create a client program. This implementation should include a class that implements the same public methods as the suncertify.db.Data class, although it will need different constructors to allow it to support the network configuration.
This talks about the same as implementing all the public methods as the Data class. I guess the remote client is probably the same as Data client. But I still don't get it why client needs to implement all the public methods as in Data class in remote mode. I understand the client needs to do that in local mode.
Could somebody have the same kind of questions and somebody else have different thought? Any comments are appreciated!

kerry shih
Greenhorn

Joined: Nov 04, 2001
Posts: 15
My take on this is that the client side application should know very little about the transport layer. In other words they should choose whether to connect locally or remotely but should not "see" any RMI initialization etc. The DataClient should protect them from such intracacies. Other wise the Data interface is just a bunch of delegation.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Remote client and Data client