At 04:04 AM 6/28/2002 +0200, you wrote:
>>>Keeping in mind that that the compoent in question can provide service 
>>>information based on static declarations in an assembly file - I need to 
>>>figure out how this information can be made available to another 
>>>container without supplying a .xinfo file.
>>
>>
>>I am not sure it is possible unless we start defining Factorys for Avalon 
>>components. For a factory you pass in a implementation key (usually 
>>classname) and aquire an instance of type. The factory would also expose 
>>the MetaInfo associated with type.
>
>
>No - I'm still at meta-land, no component instantiation.

Read above again - no need to instantiate type to instantiate types metadata.

>   The action of ComponentInfo (dependecies, services, etc.) creation is 
> the point I want to intercept as part of a "standard" containerkit meta 
> loading/validation process.  This is needed to be able to plug the 
> component into something like SimpleServiceKernel and everything will 
> just work fine because the .xinfo for my component will declare the 
> ComponentInfo handler - using this information the kernel can delegate 
> the ComponentInfo creation to the handler.  The kernel just gets back the 
> ComponentInfo and continues on as normal.
>
>E.g.
>
>    interface InfoProvider
>    {
>        ComponentInfo getComponentInfo( Class class );
>    }
>
>And in the .xinfo:
>
>    <component-info factory="MyInfoProvider"/>

What I prposed was more along the lines of

interface ComponentFactory
{
   Object createComponent(String implKey);
   ComponentInfo createComponentInfo(String implKey);
}

When "registering" a type into the system you register a coresponding 
factory and all is good. You can do what you want and plenty more.



Cheers,

Peter Donald
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"Faced with the choice between changing one's mind,
and proving that there is no need to do so - almost
everyone gets busy on the proof."
              - John Kenneth Galbraith
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


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

Reply via email to