You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by Carsten Ziegeler <cz...@apache.org> on 2013/12/10 00:42:36 UTC

Re: [Sling Event] difference between JobConsumer and JobExecutor

Hi

as Victor points out JobExecutor provides more functionality for the
implementor (like tracking, logging etc). JobConsumer is the preceding
variant which I didn't want to deprecate right now as it allows you to
implement a simpler interface if your implementation does not care about
the additional features.

Carsten


2013/11/18 Victor Saar <vs...@adobe.com>

> Hi Tommaso,
>
> JobExecutor has recently replaced JobConsumer while support for progress
> tracking was introduced. AFAIK JobConsumer should have been deprecated
> already. I guess the documentation was not yet updated accordingly.
>
> Ciao, Victor.
>
> On 15.11.13 14:39, "Tommaso Teofili" <to...@gmail.com> wrote:
>
> >Hi all,
> >
> >while working with Sling Event I noticed there's a somewhat similar API
> >for
> >consuming a Job defined in JobConsumer and JobExecutor.
> >The API and javadoc for them are quite similar except that the executor
> >also gets an ExecutorContext while executing the Job.
> >
> >Is there any guideline about which one is better suitable for what
> >scenario
> >and / or if one should just use one instead of the other in general?
> >
> >Thanks in advance for your help,
> >Regards,
> >Tommaso
> >
> >[1] :
> >
> http://sling.apache.org/documentation/the-sling-engine/eventing-and-jobs.h
> >tml
> >[2] :
> >
> http://sling.apache.org/documentation/bundles/apache-sling-eventing-and-jo
> >b-handling.html
>
>


-- 
Carsten Ziegeler
cziegeler@apache.org

Re: [Sling Event] difference between JobConsumer and JobExecutor

Posted by Tommaso Teofili <to...@gmail.com>.
got it, thanks a lot Victor and Carsten for the explanation.
Regards,
Tommaso


2013/12/10 Carsten Ziegeler <cz...@apache.org>

> Hi
>
> as Victor points out JobExecutor provides more functionality for the
> implementor (like tracking, logging etc). JobConsumer is the preceding
> variant which I didn't want to deprecate right now as it allows you to
> implement a simpler interface if your implementation does not care about
> the additional features.
>
> Carsten
>
>
> 2013/11/18 Victor Saar <vs...@adobe.com>
>
> > Hi Tommaso,
> >
> > JobExecutor has recently replaced JobConsumer while support for progress
> > tracking was introduced. AFAIK JobConsumer should have been deprecated
> > already. I guess the documentation was not yet updated accordingly.
> >
> > Ciao, Victor.
> >
> > On 15.11.13 14:39, "Tommaso Teofili" <to...@gmail.com> wrote:
> >
> > >Hi all,
> > >
> > >while working with Sling Event I noticed there's a somewhat similar API
> > >for
> > >consuming a Job defined in JobConsumer and JobExecutor.
> > >The API and javadoc for them are quite similar except that the executor
> > >also gets an ExecutorContext while executing the Job.
> > >
> > >Is there any guideline about which one is better suitable for what
> > >scenario
> > >and / or if one should just use one instead of the other in general?
> > >
> > >Thanks in advance for your help,
> > >Regards,
> > >Tommaso
> > >
> > >[1] :
> > >
> >
> http://sling.apache.org/documentation/the-sling-engine/eventing-and-jobs.h
> > >tml
> > >[2] :
> > >
> >
> http://sling.apache.org/documentation/bundles/apache-sling-eventing-and-jo
> > >b-handling.html
> >
> >
>
>
> --
> Carsten Ziegeler
> cziegeler@apache.org
>