File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Decoupling client and server

 
Chiji Nwankwo
Ranch Hand
Posts: 56
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Could you please tell me what techniques you used to decouple the client side from the server side of the application. For instance, if the server shuts down while the client is still connected, how do you notify the client the server is no longer available? How does the client recover from that scenario?
Please let me know what you think.
Thanks,
Chiji
 
Chiji Nwankwo
Ranch Hand
Posts: 56
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am resending my previous message. Please respond.

Could you please tell me what techniques you used to decouple the client side from the server side of the application. For instance, if the server shuts down while the client is still connected, how do you notify the client the server is no longer available? How does the client recover from that scenario?
Please let me know what you think.

Thanks,
Chiji
 
Max Habibi
town drunk
( and author)
Sheriff
Posts: 4118
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Chiji,
Generally, you want an intermediary class, say a controller or a delegator, that acts as an emissary between your server and the gui. If you use RMI, a non connected server will throw an RMI exception when you request service from it(or, to be precise, RMI does). Your intermediary class can catch that exception. Once that's done, the intermediary can log the error and can throw a 'friendly' gui exception for the gui layer. My book actually digs into this pretty deeply.
HTH,
M, author
The Sun Certified Java Developer Exam with J2SE 1.4
[ July 24, 2002: Message edited by: Max Habibi ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic