jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Carsten Ziegeler <cziege...@apache.org>
Subject Re: [RT] Adding event interface to jackrabbit api
Date Tue, 22 Jul 2008 09:10:34 GMT
Jukka Zitting wrote:
> Hi,
> 
> On Mon, Jul 21, 2008 at 7:13 PM, Carsten Ziegeler <cziegeler@apache.org> wrote:
>> Now, actually, I need this second use case as well :)
> 
> Hmm, interesting. What's the use case? I.e. what would your "process"
> actions look like in:
> 
>     if (event.isLocal() ) {
>         // process local event
>     } else {
>         // process external event
>     }
> 
Yes.

> Most notably, what's the "process external event" action that isn't
> also performed for local events?
> 
In the local case I do some post processing - so the isLocal() check 
ensures that the post processing is done once.

In both cases I'm generating application events out of the observation 
events, like a page has changed event, removed etc. The post processing 
is actually done based on this application events, so if a page has 
changed, some action is started. Therefore my application events need to 
be marked as local as well.

So basically my code looks like this:
      if (event.isLocal() ) {
          // send local app event
      } else {
          // send remote app event
      }

Carsten
-- 
Carsten Ziegeler
cziegeler@apache.org

Mime
View raw message