avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Leo Sutic" <leo.su...@inspireinfrastructure.com>
Subject RE: MutableConfiguration Proposal Summary
Date Fri, 06 Feb 2004 13:36:42 GMT
avalon-framework-api is out. Vote will be between -spi and -impl.

> From: Stephen McConnell [mailto:mcconnell@apache.org] 
>
> > Then, you can pass in the DefaultImmutableConfiguration to any
client 
> > that expects to hold on to a reference for ever and ever, and you
can 
> > just pass your regular MutableConfiguration to the methods that just

> > require the configuration not to change at all.
> 
> I've parsed the above sentence multiple times and I'm still 
> in trying to figure out what this means.

OK, trying to clarify the above (I get some parsing errors as well):

The question is this: Given that you have a DefaultConfiguration and a
client
that expects a Configuration, when should you create a 
DefaultImmutableConfiguration from your DefaultConfiguration and pass
it, and
when can you just pass your existing DefaultConfiguration?

My answer to that is:

Create a DefaultImmutableConfiguration when the client will hold on to
the reference you pass in. (Or when you don't trust the client.)

Pass your existing DefaultConfiguration when the client will not hold
on to the reference and when you trust it.

/LS


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org


Mime
View raw message