river-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Patrick Wright <pdoubl...@gmail.com>
Subject Re: Use of socket factory in LookupLocator
Date Tue, 10 Nov 2009 10:19:05 GMT
I don't know how the Jini team originally decided on where
Configuration should be part of a class, and where not. What I see in
the APIs is that the (conceptually) top-level APIs are configured with
a Configuration, though.

I think the point may be that the non-Configuration parameters to a
class are generally those which must be supported by a qualifying
implementation; whatever is in the Configuration is an internal
decision of a specific implementation. I think host and port make
sense as part of the LL API, whereas how sockets are created or
configured is an implementation decision for a Jini implementation.
For example, an implementation may decide to keep the socket factory
itself private to the class, while allowing certain socket parameters
like timeout to be configured via Configuration.

That's how I see the reasoning, in any case.

I'm glad you are working on the toolkit, but I really, really think we
should simply freeze any further development and get the release out
the door and look at this again after the release is made.


On Tue, Nov 10, 2009 at 10:37 AM, Sim IJskes - QCG <sim@qcg.nl> wrote:
> Sorry, i disagree,
>
> A SSLEndpoint starts it life also as a constructor without a config object.
> A LookupLocator is an entity of the same pattern.
>
> Gr. Sim
>
> Patrick Wright wrote:
>>
>> No, the standard approach would be that the LookupLocator constructor
>> would take a Configuration object, and the specification/API would
>> specify which keys would be read from the configuration to configure
>> the locator. See the APIs for net.jini.discovery.LookupDiscovery, for
>> example.
>>
>>
>>> Yes, but in order to configure a LookupLocator, you need a constructor to
>>> specifiy in the config file.
>>>
>>> like
>>>
>>> a.b.c {
>>>       socketFactory = new MySocketFactory();
>>>       lookupLocator = new LookupLocator("jini://d", socketFactory );
>>> }
>>>
>>> instead of (without)
>>> a.b.c {
>>>       lookupLocator = new LookupLocator("jini://d" );
>>> }
>>>
>>>
>>> Gr. Sim
>>>
>>>
>>> --
>>> QCG, Software voor het MKB, 071-5890970, http://www.qcg.nl
>>> Quality Consultancy Group b.v., Leiderdorp, Kvk Leiden: 28088397
>>>
>
>
> --
> QCG, Software voor het MKB, 071-5890970, http://www.qcg.nl
> Quality Consultancy Group b.v., Leiderdorp, Kvk Leiden: 28088397
>

Mime
View raw message