tuscany-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ant elder <antel...@apache.org>
Subject Re: SCAClient API spec proposal
Date Wed, 13 May 2009 12:49:19 GMT
On Wed, May 13, 2009 at 1:05 PM, Simon Laws <simonslaws@googlemail.com> 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

Mime
View raw message