avalon-apps-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mauro Talevi <mauro.tal...@aquilonia.org>
Subject Re: Cornerstone addition and patch
Date Sat, 30 Nov 2002 14:40:40 GMT
Paul Hammant wrote:

> Mauro,
> Applied, thanks.  Not sure about the 'throws (derivative of) 
> RuntimeException' in one of the block method signatures. Will think 
> about it some more.

The main reason it's there is that was suggested in the event notifier 
pattern paper and I just went along with it - treating it as an
implementation detail which could be modified later.
The exception is not thrown if one registers an event which is a 
subclass or subtype of the root event
(which should really be configured or you need to slightly modify to 
present code to have the full Event class name as the rootEventType)
and that is the most common case.
But I do recognise the need to make the interface more solid and generic.
The preferred alternative is make the Register methods throw a checked 
exception.  One could also ignore the subscribtion if the
event is not a subclass of the root event but I do not like that.
I'll modify the interface to throw a checked exception and send in a patch.

> Is there any chance there could be an example of use that we could add 
> to the jakarta-avalon-apps/demo package?  Maybe this is not a new 
> demo, but a value added modifaction to an old one.. maybe not.

I was thinking of writing one - I think it's probably best to have a new 
demo package, say eventhelloworldserver
because I would like to have two different blocks "talk" to each other 
via events.
I also want to write a little demo that allows the callback to remote 
non phoenix blocks, eg a swing or servlet client, which is the real power
of the event notifier pattern

Cheers, Mauro

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

View raw message