Return-Path: Delivered-To: apmail-jackrabbit-dev-archive@www.apache.org Received: (qmail 13900 invoked from network); 22 Jul 2008 09:10:58 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 22 Jul 2008 09:10:58 -0000 Received: (qmail 2252 invoked by uid 500); 22 Jul 2008 09:10:57 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 2216 invoked by uid 500); 22 Jul 2008 09:10:57 -0000 Mailing-List: contact dev-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@jackrabbit.apache.org Delivered-To: mailing list dev@jackrabbit.apache.org Received: (qmail 2205 invoked by uid 99); 22 Jul 2008 09:10:57 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Jul 2008 02:10:57 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.9] (HELO minotaur.apache.org) (140.211.11.9) by apache.org (qpsmtpd/0.29) with SMTP; Tue, 22 Jul 2008 09:10:11 +0000 Received: (qmail 13812 invoked from network); 22 Jul 2008 09:10:36 -0000 Received: from localhost (HELO carsten-ziegelers-computer.local) (127.0.0.1) by localhost with SMTP; 22 Jul 2008 09:10:36 -0000 Message-ID: <4885A40A.90004@apache.org> Date: Tue, 22 Jul 2008 11:10:34 +0200 From: Carsten Ziegeler User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; de; rv:1.8.1.14) Gecko/20080421 Lightning/0.8 Thunderbird/2.0.0.14 Mnenhy/0.7.5.666 MIME-Version: 1.0 To: dev@jackrabbit.apache.org Subject: Re: [RT] Adding event interface to jackrabbit api References: <486CCF28.4090301@apache.org> <510143ac0807071614y1f3ae750lc7b34c64e468e776@mail.gmail.com> <48730270.6090500@apache.org> <487B024B.9040909@apache.org> <510143ac0807140137h57a7d931p276ae397f614c113@mail.gmail.com> <487C4EBF.1020209@apache.org> <510143ac0807150042u5bcc7edas391dd31496226639@mail.gmail.com> <487C5604.6080407@apache.org> <4884B59F.2040902@apache.org> <510143ac0807220151n471bac0bs48353492f75f38a@mail.gmail.com> In-Reply-To: <510143ac0807220151n471bac0bs48353492f75f38a@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Jukka Zitting wrote: > Hi, > > On Mon, Jul 21, 2008 at 7:13 PM, Carsten Ziegeler 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