• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

Can i modify the interface sun providing

 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I have a question about the Interface Sun provided.
When I implements RMI, I reliased that i need to thorw RemoteException for all method in the SUN provide interface.

What i am wondering is that can i change interface??
can i throw more exceptions in the sun provided interface?

Cheers
 
Ranch Hand
Posts: 334
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The one of the must conditions is the original interface should not be altered. You can extend the interface and throw your own exceptions and rmi exceptions.
 
Ranch Hand
Posts: 123
Hibernate Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Simply... No. I mean if you add custom exceptions then you are now programming to an implementation rather than an interface (if you are confused or unsure or never ehard that OO principle, I can suggest Head First Design Patterns).
[ November 30, 2008: Message edited by: Justin Rundle ]
 
She's brilliant. She can see what can be and is not limited to what is. And she knows this tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic