I am using the Adapter Pattern to retrofit my application with RMI. I have 2 interfaces which has all the methods of Data. The first one is RemoteDataServiceIF which extends Remote. The second one is LocalDataServiceIF which does not extend Remote. On the Server side I have a class FBNServer extending UnicastRemoteObject & implementing RemoteDataServiceIF. I have a class FBNClient which implements the LocalDataServiceIF - This class connects to the local or Remote Data instance depending upon a boolean value. Is this Design okay? Please reply, poornima.
posted 15 years ago
Hi, seems that this method presents a duplication of code. If I understand correctly, you will have 2 separate implementation classes, one for client and the other for server. If you add/modify any inner workings, you will have to do it in two places. Just a thought... Mike