[jsword-devel] Job names and internationalisation

Chris Burrell chris at burrell.me.uk
Sat Feb 2 11:01:57 MST 2013


The problem is that I don't have listeners, and I can't use that
functionality, since my web page can call back to my server much later. So
I need something to give to my webpage, to then be able to look up the
corresponding job later.

As far as I can see, the only data I can get out of JobManager is getJobs()
and this gives me Progress. And the only data from Progress is the job name.

I want to avoid having to change the state of the system, between two HTTP
requests. In other words, I want to keep the statelessness of HTTP by
simply sending back an ID of some sort.

Even using Listeners, I have to tie in some work listener from one request
to speak to a second request which is coming in. This presumably would have
to store some sort of cached map between the listeners and the version that
is being installed for instance.

It would be nicer if when a job gets kicked off, I get an ID, and then from
the ID I can simply lookup progress of that job.

Chris



On 2 February 2013 17:52, DM Smith <dmsmith at crosswire.org> wrote:

> I'm looking at it a bit more closely now. Not sure how it is a problem to
> track progress. If you look at BibleDesktop, you can do many jobs
> simultaneously. Such as downloading and indexing Bibles. It tracks each job
> separately. It does this by registering each Job with the singleton
> JobManager.
>
> Take a look at common-swing for o.c.c.progress.swing.JobsProgressBar that
> listens to JobManager as a WorkEventListener for WorkEvents. I know that
> Swing is not part of your app, but take it as example code.
>
> Currently, it is the object itself that is used as the ID. What does jobID
> provide that "this" does not?
>
> In Him,
>         DM
>
> On Feb 2, 2013, at 10:32 AM, DM Smith <dmsmith at crosswire.org> wrote:
>
> > Sounds good. This is part of a more generalized problem where a message
> is built at the bottom of the call chain in the current locale.
> >
> > Cent from my fone so theer mite be tipos. ;)
> >
> > On Feb 2, 2013, at 8:59 AM, Chris Burrell <chris at burrell.me.uk> wrote:
> >
> >> Hi all
> >>
> >> Job names for installing Bibles are (unfortunately) localised Strings.
> While this good if you're using it to display the user, it makes tracking
> of the progress difficult.
> >>
> >> Can I suggest some JobID that we can track it from? Or is there already
> a better way implemented that I haven't found yet?
> >>
> >> Chris
> >>
> >> _______________________________________________
> >> jsword-devel mailing list
> >> jsword-devel at crosswire.org
> >> http://www.crosswire.org/mailman/listinfo/jsword-devel
> >
> > _______________________________________________
> > jsword-devel mailing list
> > jsword-devel at crosswire.org
> > http://www.crosswire.org/mailman/listinfo/jsword-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.crosswire.org/pipermail/jsword-devel/attachments/20130202/f2112a15/attachment.html>


More information about the jsword-devel mailing list