cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Carsten Ziegeler <cziege...@apache.org>
Subject Re: [RT] Sitemap Listeners
Date Fri, 15 Apr 2005 16:47:44 GMT
Leszek Gawron wrote:
> Carsten Ziegeler wrote:
> 
>>I while ago we briefly discussed the idea of sitemap listeners that are
>>invoked each time a sitemap is entered/left.
>>
>>Our 2.2 code base contains a first implementation which can be seen as a
>>very simple base for this feature. I think it's time now to discuss this
>>further.
>>
>>1. Configuration
>>
>>You can define listeners in the map:components section in a sitemap with:
>><map:listeners>
>>  <map:listener role="Some Avalon role"/>
>>  <map:listener class="A class"/>
>></map:listeners>
>>
>>So you can either use a configured component or define a class and then
>>an instance of this class is created (using the per sitemap
>>classloader). In both cases the listener must be thread safe.
>>
>>2. Listeners and Events
>>
>>Currently there are two listener types defined (in o.a.c.sitemap):
>>
>>public interface EnterSitemapEventListener extends SitemapListener {
>>
>>    void enteredSitemap(EnterSitemapEvent event);
>>}
>>public interface LeaveSitemapEventListener extends SitemapListener {
>>
>>    void leftSitemap(LeaveSitemapEvent event);
>>}
> 
> is left sitemap fired after the request has been processed? I mean can I 
> implement open session in view pattern using your listener?
> 
Yes, it is fired after the processing - when the serializer/reader is
finished. I'm not sure what you mean with your second sentence?

Carsten

-- 
Carsten Ziegeler - Open Source Group, S&N AG
http://www.s-und-n.de
http://www.osoco.org/weblogs/rael/

Mime
View raw message