RE: [Avalon4:PROPOSAL] Context Consensus

Leo Simons <[email protected]>
Newsgroups gmane.comp.jakarta.avalon.apps.devel,gmane.comp.jakarta.avalon.devel
Message-ID <[email protected]>
On Wed, 2002-12-11 at 15:03, Leo Sutic wrote:
> > On Wed, 2002-12-11 at 00:23, Leo Sutic wrote:
> > > There is currently *not* consensus that a component should be able
> to
> > > specify any interface that it should be able to cast the context to.
> 
> > > That is, for every class/interface T,
> > > 
> > >      public void contextualize (Context context) {
> > >          T myContext = (T) context;
> > >      }
> > > 
> > > the component should be able to declare that it expects to cast the 
> > > context
> > > to a T. (For a less abstract example, replace T with BlockContext.)
> > 
> > note: the main reason I don't like this is because it means 
> > the container impl must do proxying, which is heavyweight.
> 
> Note that the proposal does *not* say that the container must be able
> to *satisfy* any request. It merely acknowledges that a component
> may *ask* for a context class T.

ah. ok. So a component author declares "I need a T context" and the
container says "don't have one, so I'm not running you". Cool.

cheers,

- other Leo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.