avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <dona...@apache.org>
Subject Re: NEWBIE AVALON QUESTION
Date Thu, 11 Oct 2001 09:29:20 GMT
On Thu, 11 Oct 2001 00:35, Jean-Philippe Dutreve wrote:
> Hi Peter,
>
> Sorry for this stupid question.

Not a stupid question #;)

> But I wonder why java interfaces in Cornerstone which have a
> ROLE field don't extend from Component.
>
> From ComponentManager, i can read :
>
> /** Get the <code>Component</code> associated with the given role. **/
> Component lookup( String role );
>
> But, for instance, in SimpleServer we have :
> public void compose( final ComponentManager componentManager )    {
>         m_socketManager = (SocketManager)componentManager.lookup(
> SocketManager.ROLE );
> ...
> }
>
> and SocketManager doesn't extend from Component !!!
>
> Is the contract respected ?

All Service interfaces are Blocks and Block extends Component. Hence all 
services indirectly implement Component.

Originally we had it that Services extended Component but we changed our 
minds on this. The reason is that Services define behaviour while COmponent 
describes structure. Thats not very clear. Maybe if I associated it with 
other words

Component is like: Apple, Bannanna, Orange
Service is like: Eatable, Drinkable and Throwable

Does that make it any clearer ? ;)

BTW I CCed avalon-dev and maybe one of them can explain it better.

-- 
Cheers,

Pete

*-----------------------------------------------------------------------*
PROGRAM: n.  a magic spell cast over a computer allowing it to turn
one's input into error messages.  v.t.  to engage in a pastime similar
to banging one's head against a wall, but with fewer opportunities for 
reward.
*-----------------------------------------------------------------------*


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


Mime
View raw message