• Post Reply Bookmark Topic Watch Topic
  • New Topic

Serialization with RMI  RSS feed

 
Chris Robinson
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I need to send an object between a client and server using RMI. As far as I understand I need to implement the Serializable interface in the class that I want to send objects of in order to send them as a byte stream.
Can I then just pass the object in a method call as normal and let the RMI do the work required at both ends or do I have to carry out some form of manual Serialization at the sender and Deserialization at the receiver?
 
Joe Ess
Bartender
Posts: 9406
12
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you use RMI, you simply invoke the remote method with an instance of your Serializable object. That's the beauty of it. Check out the Java Tutorial: RMI for examples.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!