• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

Basic Design

 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I have come up with the following design.
Any suggestions/comments would be welcome.

interface DataInterface //Used for local mode and has all the public methods of Data.
class FBNData extends Data implements DataInterface
interface RemoteDataInterface extends DataInterface,Remote
//Used for Remote mode.Has the same methods as DataInterface but they throw RemoteException.
class RemoteData implements RemoteDataInterface //This has a reference to FBNData
I am also planning to have a factory class called FBNFactory which might return the appropriate instance depending on the mode (local/remote)to the GUI.
At the moment, I am worried about the interfaces DataInterface and RemoteDataInterface. The duplication of methods in them.Ofcourse they throw different exceptions.
Is there a way to get around that problem.
And then locking...should we implement locks in the local mode as well.
Thanks in advance.
Cheers,
Sowjanya

 
A wop bop a lu bop a womp bam boom! Tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic