Iam confused with design for Switching modes for client. I was planning to write Interface1. Then implement them in 2 different interfaces LocalInterface , RemoteInterface which throws Remote Exception both of them will implement the public methods for Data class. My serverclass will extend RemoteInterface. In my client i will have if( i==1) interface1 = new Data(); else interface1 = (RemoteInterface)Naming.lookup(url); Will this approach work ? pls reply asap.
how about this... AbstractClientData data = ConnectionFactory.getConnection(CONNECTION_MODE); the questions to ask are: 1. why use a factory? 2. why use an abstract class instead of interface? or why not use both? 3. what type of exception should getConnction() throw? This will help you with your docs too. [ January 29, 2002: Message edited by: Gennady Shapiro ]
My, my, aren't you a big fella. Here, have a tiny ad:
Devious Experiments for a Truly Passive Greenhouse!