Hello all,
I've read some threads recently about creating Service interfaces that can be used in networked and standalone modes.
My GUI controller will have a reference to a Service object that could be a remote stub or a local object. Does it violate spec to use the same class for both modes? I would like to use the Remote object in standalone mode. I would not use any networking but the object I create would be a Remote (object instanceof Remote). Since my assignment says that none of the network server code may be used in standalone mode I'm worried that this might be against the spec.
The alternative I've been reading about is to create a separate RemoteService interface that extends Service. So Service would not be a Remote but its methods would throw RemoteException. Can anyone help me understand why I can't just use the one Remote object in both modes?
I've read some threads recently about creating Service interfaces that can be used in networked and standalone modes.
My GUI controller will have a reference to a Service object that could be a remote stub or a local object. Does it violate spec to use the same class for both modes? I would like to use the Remote object in standalone mode. I would not use any networking but the object I create would be a Remote (object instanceof Remote). Since my assignment says that none of the network server code may be used in standalone mode I'm worried that this might be against the spec.
The alternative I've been reading about is to create a separate RemoteService interface that extends Service. So Service would not be a Remote but its methods would throw RemoteException. Can anyone help me understand why I can't just use the one Remote object in both modes?