Hi Jason,
First, the difference between the vernacular usage of a
pattern's name and it's actual definition can get blurry, so don't take my
word for any of this: there's a nice article
here about it. However, I would say it's an Adapter.
Now, to answer the heart of your question. What I suggest is that you have two implementation of the connection interface. A RemoteConnection, and a LocalConnection, and you have a Factory that doles these out to the GUI clients. They're the adapter(sic) that the GUI class will be working with, and they throw GUI friendly exceptions like "GUIRecordNotFoundException", "GUIFatalErrorException", etc. However, they(the Connections), internally, handle the complexity of working with the actual Remote or Local DataImpl. Thus, RemoteConnection might catch a RemoteException, wrap it in a GUIFatalErrorException, and throw it to the client. Similarly, The LocalConnection might catch a plain vanilla IOException, wrap it in a GUIFatalException, and pass it to the GUI.Either way, the GUI never knows, or cares, if it's working remotely or locally.
Incidentally, this is a great opportunity to use and learn about Exception chaining.
Does that help?
All best,
M
[ July 17, 2003: Message edited by: Max Habibi ]
[ July 17, 2003: Message edited by: Max Habibi ]