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
Hello,

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.)
[...]
<block class="CLAS_WITH_INITIAZILE_COMPOSE_ETC"" name="BLOCK1">
   <provide name="BLOCK2" role="INTERFACE_VON_BLOCK2"/>
   <provide name="BLOCK3" role="INTERFACE_VON_BLOCK3"/>
</block>
[...]
Using Block1.xinfo
[...]
<services>
      <service name="INTERFACE_VON_BLOCK1" version="1.0"/>
</services>
<dependencies>
  <dependency>
      <service name="INTERFACE_VON_BLOCK2" version="1.0"/>
  </dependency>
  <dependency>
      <service name="INTERFACE_VON_BLOCK3" version="1.0"/>
  </dependency>
   ......
</dependencies>
[...]
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>


Mime
View raw message