• Post Reply Bookmark Topic Watch Topic
  • New Topic

Is RemoteDataImpl a real remote object?  RSS feed

 
Frank Liu
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does it need to generate RMI stub?If need ,then every public method in it should throw RemoteException.RemoteDataImpl has the same interface (DataInterface) as Data.The method in Data no need to throw RemoteException.Then how can I define DataInterface?
 
Peter den Haan
author
Ranch Hand
Posts: 3252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
RemoteDataImpl methods don't need to throw RemoteException, and neither do Data methods. It is perfectly legal for an interface implementation to throw fewer or narrower exceptions than the interface says. In general, it is perfectly legal for a subtype to narrow a type's throws clause.
- Peter
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!