wood burning stoves 2.0*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes RMI client implementing Data class methods??? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "RMI client implementing Data class methods???" Watch "RMI client implementing Data class methods???" New topic
Author

RMI client implementing Data class methods???

amit sharma777
Greenhorn

Joined: May 25, 2001
Posts: 11
I am not clear as to why should the client class implement all the public methods of the Data class .If we write an RMI server which implements all the public methods and export it to the client as well as adding the client to a vector in the server by putting a client stub in the server classpath ---it appears to work.




Alex Zhang
Ranch Hand

Joined: Apr 19, 2001
Posts: 68
As the data class is on the server side,
to ensure your client application will also provide the same services as the data server can help, it requires u to implement all the methods as the data server has.
Alex Zhang
Ranch Hand

Joined: Apr 19, 2001
Posts: 68
To RMI implementation, I think developer can just make an interface which has all the methods included and this interface extends Remote, and deploy it on the client side application, this can fulfill the requirement.
As I did it just as the same way.
shailesh sonavadekar
Ranch Hand

Joined: Oct 12, 2000
Posts: 1874
Anil Sharma , Welcome to javaranch.
PROPER NAMES ARE NOW REQUIRED
Please look carefully at official naming policy at javaranch & reregister yourself with proper last name. Please adhere to official naming policy & help maintain the decorum of the forum.
Waiting for your posts with proper last name. Once you have reregister , please let us know about that & then your previous account will be disabled.
Regards.

Your Friendly Bartender
Shailesh.
Rick Fortier
Ranch Hand

Joined: Jun 04, 2001
Posts: 147
If the Data class implements Remote, then how can the client use it when it is operating in local mode?
I am thinking that I might create a proxy class on the server, which implements the data interface, and then have this class pass on the requests to the Data object.
Then on the client side, it can instantiate the Data class.
Conor Allen
Ranch Hand

Joined: Apr 27, 2001
Posts: 32
If the data class implements the remote interface then the client just uses an object which implements that interface .... whether it is local or remote is irrelevant
Regards
Conor
amit sharma777
Greenhorn

Joined: May 25, 2001
Posts: 11
Hi Conor,
Do you mean that the client should perhaps implement the same interface that the Data class on the Server is implementing in this way we can just have a reference to that interface no matter if it is remote or local.Can you give me any other purpose of implementing the methods of the Data class on the Client apart from the fact that they can be used in the local mode.
Conor Allen
Ranch Hand

Joined: Apr 27, 2001
Posts: 32
To be honest, I am not sure how good an idea it is. It does mean that you can provide a remote interface to the Data class which can then be reused for any database which needs that type of functionality.
Clear as mud??
 
Consider Paul's rocket mass heater.
 
subject: RMI client implementing Data class methods???
 
Similar Threads
Clarification on Requirement
Why the remote client code must provide all the public methods of the Data class?
Passed with a 142
Remote client and Data client
What does this mean