• Post Reply Bookmark Topic Watch Topic
  • New Topic

Rmi  RSS feed

 
Soman Singh
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello,
Can we send a String parameter in Rmi?
Regards,
sos
 
Pradeep bhatt
Ranch Hand
Posts: 8933
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes.
 
Tiberiu Paun
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
U can send anything that implements Serializble, as input param, or as output in RMI.
While String class implements Serializable, yes, u can send a String .
The whole thing is that when u send a request, from the socket u get an ObjectOutputStream, and an ObjectInputStream. U can readObject() and writeObject on that socket, throught those streams, only if the object send and received can be serializable. Otherwise, it will throw a NotSerializableException
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!