On Tue, 8 Jan 2002 19:45, Jeremias Maerki wrote:
> After having learned to extend Work interfaces from the Component
> interface, I've noticed that TimeScheduler does not yet follow this rule.
> Instead the implementation implements Component/Block.

Im not sure I follow you. Generally none of my work interfaces extend 
Component/Block because I though that was good practice ;)

I must have missed the discussion where it was decided that this is bad - 
could you give me a pointer to it ?

> Therefore, I have looked around in Cornerstone for similar cases. Below
> is a list of stuff I have found. I'm not sure that I have seen everything
> and I haven't checked the apps directory, nor Excalibur in general. Some
> interfaces have no ROLE constant. I have added a comment where I think a
> ROLE constant should be added.

ROLEs should probably be added - mainly for convenience sake.

> Not being a Avalon pro (yet), I may be wrong about this. But if I am, it
> would be good if someone could update the components so all follow the
> same conventions.
>
> Since Block extends Component I'm wondering if the same rules (as for
> Component) should apply to Block as well.

Not sure - Block and Component are in the same family of interfaces so should 
behave the same. Here is my breakdown of interfaces

1. Structural: Component, Block
2. Lifecycle: LogEnabled, Initializable, Configurable, Startable etc
3. Service/Work/Role: ConnectionManager, ARMIExporter, PacketManager etc

The implementation generally "implements" 
1 x (1)
0-9 x (2)
0+ x (3)  <--- however usually there is only 1 except in odd circumstances

> Cornerstone:
> Classes/interfaces implementing Component:
> org.apache.avalon.cornerstone.services.connection.ConnectionHandlerFactory
> (no ROLE constant)

That has no ROLE constant because it is never placed into a ComponentManager 
and thus never needs to be retrieved from one - it is also not required to be 
a Component.

-- 
Cheers,

Pete

---------------------------------------------------
"Therefore it can be said that victorious warriors 
win first, and then go to battle, while defeated 
warriors go to battle first, and then seek to win." 
              - Sun Tzu, the Art Of War
---------------------------------------------------

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

Reply via email to