avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hans Herbert" <java_is_c...@hotmail.com>
Subject Interfaces=Services / dependencies?
Date Wed, 14 Nov 2001 11:14:59 GMT

I am new at this Mailinglist and hope that my questions are not too stupid.

a) assembly.xml versus Block.xinfo
Using assembly.xml you have to descripe (e.g.)
   <provide name="BLOCK2" role="INTERFACE_VON_BLOCK2"/>
   <provide name="BLOCK3" role="INTERFACE_VON_BLOCK3"/>
Using Block1.xinfo
      <service name="INTERFACE_VON_BLOCK1" version="1.0"/>
      <service name="INTERFACE_VON_BLOCK2" version="1.0"/>
      <service name="INTERFACE_VON_BLOCK3" version="1.0"/>
Now the question: Isn't that some kind of double information. I tried some 
different configuration, but it seems that it has to be that way.
- What is the advantage/idea behind this?

I found your last answer regarding the BlockListener and "Linking Interfaces 
to a Block". How can I implement this in my code?
Let's say, I have a Block that would like to communicate with all the other 
blocks via interfaces (of course). Either I write all these Blocks and 
interfaces in that above described way OR I say the Block "He, if a Block 
impmenets your interface, this Block wants to talk to you. So start a lookup 
at this Block using the componentManager.lookup(ROLE)".
- Is it possible to do such a checking during starting up without writing 
all down in assembly and xinfo?
- If yes, how is it possible to implement this (give me a hint)
- Can BlockListener with addBlock and removeBlock be the solution for that?
This would be a much more flexible way of linking (my opinion)

Many thanks in advance.

Hans Herbert

Downloaden Sie MSN Explorer kostenlos unter http://explorer.msn.de/intl.asp

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