avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Leif Mortenson <l...@tanukisoftware.com>
Subject Re: Instrument example
Date Mon, 29 Apr 2002 16:36:54 GMT
    Its great to have people looking at this so closely.

>1. Instrumentable defines setInstrumentName() and getInstrumentName().
>Is it on purpose that setInstrumentableName() is not called on an
>Instrumentable Component when it is created by the
>InstrumentDefaultComponentFactory? Not calling setInstrumentableName()
>does not cause any problem since getInstrumentableName() is only called
>on child Instrumentables. But the javadoc suggests it will be done: 
>/* This value may be set by a parent Instrumentable, or by the
> *  InstrumentManager using the value of the 'instrumentable' attribute
>in the configuration of the component.
>void setInstrumentableName() { ....
You are correct.  This was a bug in InstrumentDefaultComponentFactory 
that I just fixed.  The
way I was using things it was not causing any problems, but the name 
should have been set.

>2. In InstrumentComponentManager do we want to register created handlers
>to the InstrumentManager? The comments say so, but we don't call 
>// Register the new handler with the instrumentManager if it exists.
>((Instrumentable)handler).setInstrumentableName( instrumentableName );
Currently, the only handlers that are discovered durring configuration 
are are being registered.  If
you take a look at the getChildInstrumentables() method of the 
InstrumentCompantManager and
InstrumentComponentSelector, you will see where they are being 
registered.  I may need to revisit
this as it does not allow handlers added later to be registered.

Are you running into problems with the way this is currently working?


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

View raw message