On Wed, May 13, 2009 at 1:05 PM, Simon Laws <[email protected]> wrote: >>> >> >> I had a chat with Mike about what to do to improve this and we have a >> way that will help for now while we don't have a more comprehensive >> approach that works when we've support for distributed domains and >> clients remote from the nodes. I'll commit a strawman and post back >> here with details when thats in. >> >> ...ant >> > > Just looking at ... > > public class SCAClientImpl implements SCAClient { > > .... > > public static void addDomain(URI domainName, Node node) { > nodes.put(domainName, node); > } > > public static Node removeDomain(URI domainName) { > return nodes.remove(domainName); > } > > Why wouldn't we create a client for a specified domain. What is the > scenario where we would want to add more than one? > > Simon >
Actually i agree that seems more natural but thats not the approach being taken by the current SCAClient API. The API is: SCAClient scaClient = SCAClientFactory.newInstance(); so there is no domain name in there and the returned SCAClient is generic for any/all domains. Then you tell it which domain you want to talk to in the getService call: scaClient.getService(type, serviceName, domainURI) What i think you're asking and what i thought seemed more natural would be to have: SCAClient scaClient = SCAClientFactory.newInstance(domainURI); scaClient.getService(type, serviceName); I guess its a different way of thinking about what an SCAClient is, maybe if any of the spec folks are listening they could explain more? ...ant
