Mark:

The Context interface defines an object that is used as an argument
to an implementation of Contextualizable.  Context is simply a container
of Objects that are accessible by name (which is probably what
${context-key} is referring to below).  Typically a context implementation
does not have any significant behaviour beyond returning an object based
on the supplied key.  This is significantly different to something like
ComponentManager which also returns object based on keys, but is likely
to contain some level of logic concerning creation or resolution of the
object requested.

You can think of the three interfaces Configuration, ComponentManager, and
Context as a logical breakdown of the types of argument values passes to
some black-box.  Configuration represents the static information (typically
modified by someone managing the black-box).  ComponentManager represents
the
set of arguments that will typically require computation by the manager.
And Context represents other runtime variable.

A good example of Context is in org.apache.avalon.phoenix.BlockContext
It contains information such as the directory that an application should
consider as the base (the sort of thing that is figured out at runtime
as opposed to a static configuration).

Cheers, Steve.


> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of
> Mark Woon
> Sent: Saturday, 09 February, 2002 03:20
> To: Avalon Developers List
> Subject: Re: How do you define/use context keys?
>
>
> Peter Donald wrote:
>
> > On Sat, 9 Feb 2002 08:55, Mark Woon wrote:
> > >
> > >  <file id="foo">
> > >   <filename>${context-key}/real-name/...</filename>
> > >  </file>
> > >
> > > How do you specify/use a ${context-key}?
> >
> > I don't actually use this component yet so take what I say with
> a grain of
> > salt but ...
> >
> > I assume these are values that are retrieved from the Context
> object passed
> > into the LoggerManager if it is Contextualizable.
>
> Are there any sample apps that actually use Contextualizable?
> There's another
> gap in the documentation on how they're actually used.  I can
> figure out how to
> create them, and pass them around, but is there a standard way of actually
> using Context?  Is there some default/automatic ${context-key} parsing
> facility?
>
> -Mark
>
>
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to